Some Notes on Signed Numbers

Some Notes on Signed Numbers - have subtraction circuitry...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Some Notes on Signed Numbers In the microprocessor world, signed numbers are mostly 8-bits, 16-bits or 32-bits in length. Let us remember that the most significant bit is the sign bit, that is, bit 7 for an 8-bit signed number, bit 15 for a 16-bit number and bit 31 for a 32-bit number. Therefore, the decimal number +7 is represented in binary as follows (with the sign bit shown in RED ): 8-bit: 0 0000111 16-bit: 0 000000000000111 32-bit: 0 0000000000000000000000000000111 Negative numbers are in 2's complement so that the digital logic in the microprocessor can manipulate them with addition rather than subtraction, thus eliminating the need to
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: have subtraction circuitry within the silicon in addition to the addition circuitry. The decimal number -7 is represented in 2's complement as follows (with the sign bit shown in RED ): 8-bits: 7 in binary = 00000111, complementing each bit = 11111000, and adding 1 to the complemented number gives the 2's complement representation of -7 = 1 1111001 . 16-bits: Using the same approach, the 2's complement of -7 = 1 111111111111001 . 32-bits: 2's complement of -7 = 1 1111111111111111111111111111001 ....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online