6 Subtraction by addition Computers store negative numbers in the form of their arithmetic complements.Computers’ use 2’s complement form.Example, binary form1’s complement2’s complementWe will use 2’s complement for subtraction.First convert the negative number into 2’s complement form. Then add it to the other number.
7 Example,(B= =240)(A= =142)(Result=98)Discard(B=01001=9)(A=00100=4)(Result=-5)2’s complement of 11011=00101=5
8 Numeric data representation An integer or fixed point number has no decimal point.An integer I is represented in the memory of the computer by its binary form if I is positive or by its 2’s complement if I is negative.
9 BCD codeAnother way to represent numerical data is to convert each decimal digit to its corresponding binary format.4 bits are needed to code each decimal digit.Its called binary coded decimal (BCD).Example, 469
10 Alphanumeric codesThere are two 8-bit alphanumeric codes, ASCII (American Standard Code for Information Interchange) and EBCDIC (Extended Binary-Coded Decimal Interchange Code).ASCII codes have a zone part.The 16-bit Unicode is becoming popular.Unicode supports international languages.
Your consent to our cookies if you continue to use this website.