ECE 470 Midterm: ECE378 Oakland Solutions Midterm Exam

31 views4 pages
ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY
ECE-378: Computer Hardware Design Winter 2016
1 Instructor: Daniel Llamocca
Solutions - Midterm Exam
(February 18th @ 5:30 pm)
Presentation and clarity are very important! Show your procedure!
PROBLEM 1 (20 PTS)
a) Complete the following table. The decimal numbers are unsigned: (6 pts.)
Decimal
BCD
Binary
Reflective Gray Code
97
10010111
1100001
1010001
51
01010001
110011
101010
98
10011000
1100010
1010011
156
000101010110
10011100
11010010
b) Complete the following table. Use the fewest number of bits in each case: (12 pts.)
REPRESENTATION
Decimal
Sign-and-magnitude
1s complement
2s complement
-32
1100000
100000
-76
11001100
10110011
10110100
-33
1100001
1011110
1011111
69
01000101
01000101
01000101
-64
11000000
1000000
-19
110011
101100
101101
c) Convert the following decimal numbers to their 2’s complement representations. (2 pts)
-31.3125
+31.3125 = 011111.0101
100000.1011
17.375
+17.375 = 010001.011
PROBLEM 2 (10 PTS)
The figure below depicts the entire memory space of a microprocessor. Each memory address occupies one byte. 1KB = 210
bytes, 1MB = 220 bytes, 1GB = 230 bytes
What is the size (in bytes, KB, or MB) of the memory space? What is the address bus size of the microprocessor?
Address space: 0x000000 to 0xFFFFFF. To represents all these addresses, we require 24 bits. So, the address bus size
of the microprocessor is 24 bits. The size of the memory space is 224 = 16 MB
If we have a memory chip of 2 MB, how many bits do we require to address those 2 MB of memory?
2 MB = 221 bytes. Thus, we require 21 bits to address the memory device.
We want to connect the 2 MB memory chip to the microprocessor. The figure shows all the occupied portions of the
memory space. Provide an address range so that 2 MB of memory is properly addressed. You can only use the non-
occupied portions of the memory space as shown in the figure below.
2 MB of memory require 21 bits. The 21-bit address range would be from 0x00000 to 0x1FFFFF. Within the entire 24-
bit memory space. Any 24-bit range, where the 21 LSBs go from 0x00000 to 0x1FFFFF, would be valid: this results in
8 valid ranges. However, there are occupied portions in the figure, leaving only four possible ranges:
0x200000 to 0x3FFFFF
0x400000 to 0x5FFFFF we pick this one!
0x800000 to 0x9FFFFF
0xA00000 to 0xBFFFFF
8 bits
0x400000
0x5FFFFF
...
0xFFFFFF
0x000000
0x1FFFFF
0x600000
0x7FFFFF
0xC00000
... ... ...
Unlock document

This preview shows page 1 of the document.
Unlock all 4 pages and 3 million more documents.

Already have an account? Log in