
Integer Representation
Bit Binary Digit 1 byte = 8 bits 1 word = N bytes, take N to be 2 (e.g., 16 bit machine) Integer takes up 2 bytes; can be signed or unsigned. Unsigned Integers
Can represent whole numbers from 0 to 65,535 (0 to 216  1). In binary, this is from 02 to 11111111111111112 Internally, binary representation of decimal value as 16 bits. Signed Integers
Need to reserve one bit for the sign. Three ways: SignMagnitude 1's Complement 2's Complement SignMagnitude
Uses most significant bit of the word to represent the sign. 0  Positive 1  Negative. Rest of the number is encoded in magnitude part 37 = 00000000 00100101 37 = 10000000 00100101 6712 = 00011010 00111000 6712 = 10011010 00111000 Can represent numbers from 32,767 to 32,767. 215+1 .. 2151 But, two representations for zero: 0 = 00000000 00000000 0 = 10000000 00000000 Arithmetic can be cumbersome. Write my Paper for me Cheap 