Need Help ?

Home / Expert Answers / Other / 2-binary-addition-add-these-8-bit-binary-numbers-each-time-check-unsigned-and-or-signed-if-overflow-

(Answered): 2. Binary addition Add these 8-bit binary numbers. Each time, check (unsigned) and/or (signed) if o ...



2. Binary addition Add these 8-bit binary numbers. Each time, check (unsigned) and/or (signed) if overflow occurs when interp5.Endianness An address always refers to a single byte. When a value needs more than one byte to be represented, we always us

2. Binary addition Add these 8-bit binary numbers. Each time, check (unsigned) and/or (signed) if overflow occurs when interpreted that way. Did overflow occur? Did overflow occur? (#1) 0000 1000 + 0110 1111 (unsigned) (signed) (#4) 0100 0000 + 0110 0100 (unsigned) (signed) (#2) 1110 0000 + 1111 1110 (unsigned) (signed) (#5) 1100 1100 + 0000 1100 (unsigned) (signed) (#3) 0110 0011 + 1001 1101 (unsigned) (signed) (#6) 1000 0000 + 1000 2000 (unsigned) (signed) 3. Power of 2 Multiply with Shift Use shifts and add/subtracts to represent below multiplications. Use three shifts or less. Shift and add/subtract Shift and add/subtract X*56 X*35 X*12 X*22 X*131 X*17 4. Unsigned power of 2 Divide with Shift Fill in the table below bit using 8bit unsigned and shifts. (Ob is a notation we're using here to indicate binary values) In Bits In Hex In Bits In Hex 43/22 122/2 0x3A/26 OxEF/25 Ob01001101/22 Ob10011100/23 5.Endianness An address always refers to a single byte. When a value needs more than one byte to be represented, we always use the following increasing-address) bytes, e.g. a 4-byte int at address 0x100 actually takes up bytes at addresses 0x100, 0x101, 0x102, and 0x103. There's a choice to be made with these four spots, what order do we put those multiple bytes? (biggest/leftmost byte, or smallest/rightmost byte at the starting address?). Here are four definitions and their addresses. Fill in memory for a big- and little-endian system. Definition Starting Address Size (bytes) Hex Value int x = 0x17011337; 0x100 4 Ox17011337 short y = exfeed; 0x104 OxFEED char z = @xda; // 'z' OxDA; char[] = = "GMU"; Ox108 Ox71778500 Ox106 2 1 4 Big-Endian Memory: Little-Endian Memory: 0x10C Ox10B 0x10A 0x109 0x108 Ox107 Ox106 0x105 Ox104 Ox103 Ox102 0x101 0x100 Ox10C Ox10B Ox10A 0x109 Ox108 Ox107 Ox106 0x105 Ox104 Ox103 Ox102 0x101 Ox100 lola Now we can do this in reverse. Given the following memory, fill in the hex values in this chart. VALUE ADDRESS Ox56 0x112 address size value (little-endian) Ox34 Ox111 value (big-endian) Ox12 0x110 Ox Ox110 1 Ox00 0x10C Ox 0x10F 4 Ox00 ?? Ox10E 0x108 Ox100 OXFD 8 Ox Ox10D OxBA Ox10C Ox59 Ox10B Ox21 Ox10A Ox13 Ox109 0x58 0x108 Ox23 0x107 OxA1 Ox106 0x65 Ox105 Ox7c Ox104 0x98 Ox103 OxF6 Ox102 Ox13 Ox101 0x45 0x100


We have an Answer from Expert

View Expert Answer

Expert Answer


Answer to 2. Binary addition Add these 8-bit binary numbers. Each time, check (unsigned) and/or (signed) if overflow occurs when i...
We have an Answer from Expert

Buy This Answer $4

Place Order