Docsity

The Signed Complement Eight Bit Integrals - Homework 1 | CEG 320, Assignments of Computer Architecture and Organization

Toggle sidebar
bg1
CEG 320/520, Homework #1 Solutions
Page 1 of 2
Name: _____________________________
Assume we have an eight-bit machine, and that we are using unsigned eight-bit integers.
Perform the following addition operations. For each operation convert both numbers to eight-bit
binary numbers, perform the operation, and express the result as an unsigned hex and an
unsigned decimal number. Finally, indicate whether unsigned overflow has occurred.
EXAMPLE:
Binary Unsigned Hex Unsigned Decimal Overflow?
212 11010100
+66 +01000010 $16 22 YES
00010110
PROBLEMS:
Binary Unsigned Hex Unsigned Decimal Overflow?
112 01110000
+23 +00010111 $87 135 N
10000111
Binary Unsigned Hex Unsigned Decimal Overflow?
31 00011111
+72 +01001000 $67 103 N
01100111
Binary Unsigned Hex Unsigned Decimal Overflow?
241 11110001
+30 +00011110 $0F 15 YES
00001111
Binary Unsigned Hex Unsigned Decimal Overflow?
201 11001001
+112 +01110000 $39 57 YES
00111001
Binary Unsigned Hex Unsigned Decimal Overflow?
128 10000000
+44 +00101100 $AC 172 NO
10101100
pf2

Partial preview of the text

Download The Signed Complement Eight Bit Integrals - Homework 1 | CEG 320 and more Assignments Computer Architecture and Organization in PDF only on Docsity!

CEG 320/520, Homework #1 Solutions

Page 1 of 2

Name: _____________________________

Assume we have an eight-bit machine, and that we are using unsigned eight-bit integers. Perform the following addition operations. For each operation convert both numbers to eight-bit binary numbers, perform the operation, and express the result as an unsigned hex and an unsigned decimal number. Finally, indicate whether unsigned overflow has occurred.

EXAMPLE: Binary Unsigned Hex Unsigned Decimal Overflow? 212 11010100

  • 66 +01000010 $16 22 YES 00010110

PROBLEMS:

Binary Unsigned Hex Unsigned Decimal Overflow? 112 01110000

  • 23 +00010111 $87 135 N 10000111

Binary Unsigned Hex Unsigned Decimal Overflow? 31 00011111

  • 72 +01001000 $67 103 N 01100111

Binary Unsigned Hex Unsigned Decimal Overflow? 241 11110001

  • 30 +00011110 $0F 15 YES 00001111

Binary Unsigned Hex Unsigned Decimal Overflow? 201 11001001 +112 +01110000 $39 57 YES 00111001

Binary Unsigned Hex Unsigned Decimal Overflow? 128 10000000

  • 44 +00101100 $AC 172 NO 10101100

CEG 320/520, Homework #1 Solutions

Page 2 of 2

Assume we have an eight-bit machine, and that we are using signed 2’s complement eight-bit integers. Perform the following addition operations. For each operation, convert both numbers to eight-bit binary numbers, perform the operation, convert the result to 2’s complement hex, and express the result as a signed decimal number. Finally, indicate whether 2’s complement overflow has occurred.

EXAMPLE 1: 2’s complement 2’s complement Hex Signed Decimal Overflow? 117 01110101

  • 19 +00010011 $88 -120 YES 10001000

PROBLEMS:

2’s complement 2’s complement Hex Signed Decimal Overflow? 82 01010010

  • 12 +00001100 $5E 94 NO 01011110

2’s complement 2’s complement Hex Signed Decimal Overflow? 112 01110000

  • 17 +00010001 $81 -127 YES 10000001

2’s complement 2’s complement Hex Signed Decimal Overflow? 93 01011101 -24 +11101000 $45 69 NO 01000101

2’s complement 2’s complement Hex Signed Decimal Overflow? -61 11000011 -27 +11100101 $A8 -88 NO 10101000

2’s complement 2’s complement Hex Signed Decimal Overflow? -103 10011001 -39 +11011001 $72 114 YES 01110010