Discussion2Examples

# Discussion2Examples - Relative to HW2 Problem 5 Maximum and...

This preview shows pages 1–2. Sign up to view the full content.

For a signed 6 bit binary number: Maximum is 0b011111 = 0*(2) 5 +1*(2) 4 +1*(2) 3 +1*(2) 2 +1*(2) 1 +1*(2) 0 = 31 Why? Because the first bit is used to signify whether the number is negative or not. Therefore, a positive number cannot use that bit. For a ‘n’ bit binary number, the maximum possible number is when the first bit is 0 and the rest are 1’s. Since the left most bit is 0, two complement is not needed to find the decimal representation of the binary number. Minimum is 0b100000 Since we see that the number has a 1 in the most left digit and we know it is a signed number, to find the value, we need to use two’s complement. 0b100000 Binary number 0b011111 Take the complement +1 Add a 1 to the complement 0b100000 Which is 32 in decimal But since we see that the original binary number has a 1 in the most left digit, the number must be negative giving us -32. For a ‘n’ bit binary, the minimum possible number is when the first bit is 1 and the rest are 0’s. The binary number is given in two’s complement representation. Relative to HW2 Problem 5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 6

Discussion2Examples - Relative to HW2 Problem 5 Maximum and...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online