Question
1. Conversion to 2's complement Convert the following decimal numbers into 8-bit 2's complement representation. Show your work for full credit. a) 12 b) -25
1. Conversion to 2's complement
Convert the following decimal numbers into 8-bit 2's complement representation. Show your work for full credit.
a) 12
b) -25
2. Limits of representation
a) How many numbers can be represented using 7-bit 2's complement representation?
b) What is the smallest negative and the largest positive numbers that can be represented with 7 bits in 2's complement representation? Convert these numbers from decimal to 2's complement binary representation, show your work. (Note: -1 > -2, meaning -1 is larger than -2.)
3. Conversion from 2's complement
Convert the following 8-bit 2's complement numbers into their decimal representation. Show your work for full credit.
a) 01011010
b) 10110110
c) 01100111
d) 11000011
4. Binary addition
Perform the following 8-bit binary arithmetic additions. Perform the operation twice: (1st) assume that the numbers are represented in unsigned representation, and (2nd) assume that the numbers are represented in 2's complement representation.
For each operation, indicate when overflow occurs. Show your work.
a) 1000 1100 + 0110 1110
b) 0100 0110 + 0011 1100
c) 1110 1100 + 1100 1110
d) 1011 1010 + 1011 0000
5. Binary subtraction
Perform the following 8-bit binary subtraction calculations. For all of the following problems, assume that you are executing the arithmetic operations on a computer that uses 8-bit 2's complement representation for its numbers. Show your work. (Hint: replace subtraction with addition.)
a) 0000 1111 - 1110 1111
b) 0111 0111 - 0111 1010
c) 0100 1011 - 1011 1111
d) 0111 1111 - 0111 1110
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started