Add the signed numbers 00100001 and 10111100 3

This preview shows page 27 - 30 out of 60 pages.

2. Add the signed numbers 00100001 and 10111100. 3. Subtract the signed numbers 00110010 from 01110111.
4. What is the sign of the product when two negative numbers are multiplied?
6. What is the sign of the quotient when a positive number is divided by a negative number?
92 Number Systems, Operations, and Codes 2–8 Hexadecimal Numbers The hexadecimal number system has sixteen characters; it is used primarily as a compact way of displaying or writing binary numbers because it is very easy to convert between binary and hexadecimal. As you are probably aware, long binary numbers are difficult to read and write because it is easy to drop or transpose a bit. Since computers and micropro- cessors understand only 1s and 0s, it is necessary to use these digits when you program in “machine language.” Imagine writing a sixteen bit instruction for a microprocessor system in 1s and 0s. It is much more efficient to use hexadecimal or octal; octal numbers are covered in Section 2–9. Hexadecimal is widely used in computer and microprocessor applications. After completing this section, you should be able to List the hexadecimal characters Count in hexadecimal Convert from binary to hexadecimal Convert from hexadecimal to binary Convert from hexadecimal to decimal Convert from decimal to hexadecimal Add hexadecimal numbers Determine the 2’s complement of a hexadecimal number Subtract hexadecimal numbers The hexadecimal number system has a base of sixteen; that is, it is composed of 16 numeric and alphabetic characters . Most digital systems process binary data in groups that are multiples of four bits, making the hexadecimal number very convenient because each hexadecimal digit represents a 4-bit binary number (as listed in Table 2–3). The hexadecimal number system consists of digits 0–9 and letters A–F. TABLE 2–3 Decimal Binary Hexadecimal 0 0000 0 1 0001 1 2 0010 2 3 0011 3 4 0100 4 5 0101 5 6 0110 6 7 0111 7 8 1000 8 9 1001 9 10 1010 A 11 1011 B 12 1100 C 13 1101 D 14 1110 E 15 1111 F Ten numeric digits and six alphabetic characters make up the hexadecimal number sys- tem. The use of letters A, B, C, D, E, and F to represent numbers may seem strange at first, but keep in mind that any number system is only a set of sequential symbols. If you understand what quantities these symbols represent, then the form of the symbols
Hexadecimal Numbers 93 themselves is less important once you get accustomed to using them. We will use the sub- script 16 to designate hexadecimal numbers to avoid confusion with decimal numbers. Sometimes you may see an “h” following a hexadecimal number. Counting in Hexadecimal How do you count in hexadecimal once you get to F? Simply start over with another col-

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture