a) Number: 11 Let's convert this to two's complement binary Since this is a positive number. we can directly convert this into binary Divide 11 successively by 2 until the quotient is 0 > 11/2 = 5, remainder is 1 > 5/2 = 2, remainder is 1 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1011 So, 11 of decimal is 1011 in binary Adding 4 zeros on left hand side of this number to make this of length 8 so, 11 in 2's complement binary is 00001011 Number: -6 Let's convert this to two's complement binary This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 6 successively by 2 until the quotient is 0 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 110 So, 6 of decimal is 110 in binary Adding 5 zeros on left hand side of this number to make this of length 8 So, 6 in normal binary is 00000110 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 00000110 is flipped to 11111001 Step 3:. Add 1 to above result 11111001 + 1 = 11111010 so, -6 in 2's complement binary is 11111010 Adding 00001011 and 11111010 in binary 00001011 11111010 ------------- (1)00000101 ------------- Sum produces a carry of 1. We can ignore that carry. So, sum of these numbers in binary is 00000101 Verification: --------------- sum = 00000101 since left most bit is 0, this number is positive so, we can directly convert this into a decimal value => 101 => 1x2^2+0x2^1+1x2^0 => 1x4+0x2+1x1 => 4+0+1 => 5 Answer: 5 This is correct since we can verify that 11+-6 = 5 So, there was no overflow. b) Number: -4 Let's convert this to two's complement binary This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 4 successively by 2 until the quotient is 0 > 4/2 = 2, remainder is 0 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 100 So, 4 of decimal is 100 in binary Adding 5 zeros on left hand side of this number to make this of length 8 So, 4 in normal binary is 00000100 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 00000100 is flipped to 11111011 Step 3:. Add 1 to above result 11111011 + 1 = 11111100 so, -4 in 2's complement binary is 11111100 Number: 11 Let's convert this to two's complement binary Since this is a positive number. we can directly convert this into binary Divide 11 successively by 2 until the quotient is 0 > 11/2 = 5, remainder is 1 > 5/2 = 2, remainder is 1 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1011 So, 11 of decimal is 1011 in binary Adding 4 zeros on left hand side of this number to make this of length 8 so, 11 in 2's complement binary is 00001011 Adding 11111100 and 00001011 in binary 11111100 00001011 ------------- (1)00000111 ------------- Sum produces a carry of 1. We can ignore that carry. So, sum of these numbers in binary is 00000111 Verification: --------------- sum = 00000111 since left most bit is 0, this number is positive so, we can directly convert this into a decimal value => 111 => 1x2^2+1x2^1+1x2^0 => 1x4+1x2+1x1 => 4+2+1 => 7 Answer: 7 This is correct since we can verify that -4+11 = 7 So, there was no overflow. c) Number: -4 Let's convert this to two's complement binary This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 4 successively by 2 until the quotient is 0 > 4/2 = 2, remainder is 0 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 100 So, 4 of decimal is 100 in binary Adding 5 zeros on left hand side of this number to make this of length 8 So, 4 in normal binary is 00000100 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 00000100 is flipped to 11111011 Step 3:. Add 1 to above result 11111011 + 1 = 11111100 so, -4 in 2's complement binary is 11111100 Number: -11 Let's convert this to two's complement binary This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 11 successively by 2 until the quotient is 0 > 11/2 = 5, remainder is 1 > 5/2 = 2, remainder is 1 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1011 So, 11 of decimal is 1011 in binary Adding 4 zeros on left hand side of this number to make this of length 8 So, 11 in normal binary is 00001011 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 00001011 is flipped to 11110100 Step 3:. Add 1 to above result 11110100 + 1 = 11110101 so, -11 in 2's complement binary is 11110101 Adding 11111100 and 11110101 in binary 11111100 11110101 ------------- (1)11110001 ------------- Sum produces a carry of 1. We can ignore that carry. So, sum of these numbers in binary is 11110001 Verification: --------------- sum = 11110001 since left most bit is 1, this number is negative number. so, follow these steps below to convert this into a decimal value. I. first flip all the bits. Flip all 0's to 1 and all 1's to 0. 11110001 is flipped to 00001110 II. Add 1 to above result 00001110 + 1 = 00001111 III. Now convert this result to decimal value => 1111 => 1x2^3+1x2^2+1x2^1+1x2^0 => 1x8+1x4+1x2+1x1 => 8+4+2+1 => 15 Answer: -15 This is correct since we can verify that -4+-11 = -15 So, there was no overflow. d) Number: 11 Let's convert this to two's complement binary Since this is a positive number. we can directly convert this into binary Divide 11 successively by 2 until the quotient is 0 > 11/2 = 5, remainder is 1 > 5/2 = 2, remainder is 1 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1011 So, 11 of decimal is 1011 in binary Adding 4 zeros on left hand side of this number to make this of length 8 so, 11 in 2's complement binary is 00001011 Number: 4 Let's convert this to two's complement binary Since this is a positive number. we can directly convert this into binary Divide 4 successively by 2 until the quotient is 0 > 4/2 = 2, remainder is 0 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 100 So, 4 of decimal is 100 in binary Adding 5 zeros on left hand side of this number to make this of length 8 so, 4 in 2's complement binary is 00000100 Adding 00001011 and 00000100 in binary 00001011 00000100 ------------- (0)00001111 ------------- Sum does not produces a carry So, sum of these numbers in binary is 00001111 Verification: --------------- sum = 00001111 since left most bit is 0, this number is positive so, we can directly convert this into a decimal value => 1111 => 1x2^3+1x2^2+1x2^1+1x2^0 => 1x8+1x4+1x2+1x1 => 8+4+2+1 => 15 Answer: 15 This is correct since we can verify that 11+4 = 15 So, there was no overflow. e) Number: 6 Let's convert this to two's complement binary Since this is a positive number. we can directly convert this into binary Divide 6 successively by 2 until the quotient is 0 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 110 So, 6 of decimal is 110 in binary Adding 5 zeros on left hand side of this number to make this of length 8 so, 6 in 2's complement binary is 00000110 Number: -11 Let's convert this to two's complement binary This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 11 successively by 2 until the quotient is 0 > 11/2 = 5, remainder is 1 > 5/2 = 2, remainder is 1 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1011 So, 11 of decimal is 1011 in binary Adding 4 zeros on left hand side of this number to make this of length 8 So, 11 in normal binary is 00001011 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 00001011 is flipped to 11110100 Step 3:. Add 1 to above result 11110100 + 1 = 11110101 so, -11 in 2's complement binary is 11110101 Adding 00000110 and 11110101 in binary 00000110 11110101 ------------- (0)11111011 ------------- Sum does not produces a carry So, sum of these numbers in binary is 11111011 Verification: --------------- sum = 11111011 since left most bit is 1, this number is negative number. so, follow these steps below to convert this into a decimal value. I. first flip all the bits. Flip all 0's to 1 and all 1's to 0. 11111011 is flipped to 00000100 II. Add 1 to above result 00000100 + 1 = 00000101 III. Now convert this result to decimal value => 101 => 1x2^2+0x2^1+1x2^0 => 1x4+0x2+1x1 => 4+0+1 => 5 Answer: -5 This is correct since we can verify that 6+-11 = -5 So, there was no overflow.
2) Perform the following Mathematical operations Using 2's complement, Indicate where overflow occurs, (You must convert...
3. Use 6 bits (2's complement representation) to solve the following problem. Indicate any overflow. a. Convert decimal +16 and +21 to binary. (5 pts.) b. Perform the binary equivalent of (+16) + (-21) (3 pt.) c. Perform the binary equivalent of (-16)+(-21) (3 pts.)
Please show steps EXERCICE 2 Convert to binary (2's complement) using a compact notation (minimum number of digits). Number in base 10 Number in base 2 (2's complement) +126.5 -25.8125 1.375 +10.37890625 13.62109375 15.61328125 2.99609375 EXERCICE 3 Give the result of the following set of additions in 8-bit 2's complement. Addends are also in 8-bit 2's complement. Indicate by YES or NO if an overflow occurs. Addition Result Overflow ? 0011 1000 0110 0000 1011 1000 1110 0000 1100 1000...
ord Paragrapth Styles 1 Perform the following conversions Convert 51 (decimal) to binary and to hex a b. Convert 0xDI (hexadecimal) to binary and to decimal c. Convert Ob11001001 (binary) to hex and to decimal 2. Find the 2's complement of the following 4 bit numbers a 1101 b 0101 3. Perform the following 4 bit unsigned operations. For each, indicate the 4-bet result and the carry bit, and indicate if the answer is correct or not a. 5+8 b....
Compute 410 – 510 using 4-bit two’s complement addition. You will need to first convert each number into its 4-bit two’s complement code and then perform binary addition (i.e., 410 + (−510)). Provide the 4-bit result and indicate whether two’s complement overflow occurred. Check your work by converting the 4-bit result back to decimal.
Perform the following binary multiplication. Assume that all values are 2's complement numbers. Indicate the result and whether there is overflow or not. 1011* 1101
11. Perform the following hexadecimal additions and subtractions. Assume the numbers are stored in 32-bit 2’s complement binary numbers. Indicate the sign of the answer and whether overflow occurs. a. BBCA270C + AE223464 b. E3BA265F + E045B9A9 c. E9B20F5D – FE605C8D d. 5FCA5243 – AE223464
8 - For the following operations: write the operands as 2's complement binary numbers then perform the addition or subtraction operation shown. Show all work in binary operating on 8-bit numbers. • [1 pts) 6+3 . [1 pts) 6-3 • [1 pts) 3 - 6
For the following decimal numbers, convert to 8-bit binary numbers and perform addition. Use 2's complement signed numbers when subtraction is indicated. (a) 2710+ 3410 (b) 520-1810 (c) 3110 - 6310
(1) Convert the decimal numbers +61 and +27 to their 8-bit 2's complement representations. Then perform the binary equivalent of (b) (27)+ (+61); and Convert the answers back to decimal and verify that they are correct.
1.7 (2 marks) Add the following numbers in binary using 2’s complement to represent negative numbers. Use a word length of 6 bits (including sign) and indicate if an overflow occurs. Repeat using 1’s complement to represent negative numbers. (b) (−14) + (−32) (e) (−11) + (−21)