1. The decimal 50 is equivalent to what in hex?
50
48 (16 * 3)
2 ( 1 * 2)
---
32h
2. The decimal -50 is equivalent to what in hex?
100h 32h = 0011 0010b
- 32h or 1100 1101b (swap bits to get 1s complement)
--- + 0000 0001b (adjust to 2s complement)
ce -------------
1100 1110
c e
3. An unsigned byte value A7h (hex) is what in decimal?
(Ah = 10d) 10*16 + 7 = 167
4. As a signed value, FFh is what in decimal
FF = 1111 1111 (2s complement)
- 0000 0001 (adjust to 1s complement)
------------
1111 1110 (1s complement)
(-1 *) 0000 0001 (swap bits) jjo
5. The largest positive signed value that can be stored in the BL register
(1 byte long) is (hex): 7f
If we break center zero at 0000 0000 then our bit range is
1111 1111 to 0000 0000 to 0111 1111 - in decimal 7 * 16 + 15 = 127
f f 0 0 7 f
6. The maximum size of a segment is 64K bytes. Give this in hex
10000h = 1 * 16^4 + 0 * 16^3 + 0 * 16^2 + 0 * 16 ^1 + 0 * 16^0
7 The DOS can access the portion of memory with the addresses from 0 to
9FFFFh. What is this size in decimal?
9 * 16^4 + 15 * 16^3 + 15 * 16^2 + 15 * 16^1 + 15 * 16^0
9 * 65536 + 15 * 4096 + 15 * 256 + 15 * 16 + 15 * 1
589824 + 61440 + 3840 + 240 + 15
= 655359 (maximum value but in memory location 0 also exists)
655360 or 640K of address space
Or 9FFFFh + 1h = 10000h or 10 * 16^4 = 10 * 65536 = 655360d
8. The CGA (color graphics adaptor) is located at B8000h, what is
its decimal address?
Bh = 11d 11 * 16^4 + 8 * 16^3 + 0 * 16^2 + 0 * 16^1 + 0 * 16^0
11 * 65536 + 8 * 4096 + 0
720896 + 32768 = 753664 bytes
But in the computer world 1k is 1024 not 1000
So 753664 bytes/ 1024 bytes/Kilobyte = 736 Kilobytes
9. As the Intel 8086 uses 20 address pins (bits), the largest address
it can access is in hex?
If you have 20 pins, you have 20 bits. Set them all on. (@ are unsigned)
1111 1111 1111 1111 1111 (pins or bits or binary)
F F F F F hex
Also 2^20 addresses but address zero is one, so the highest address
value is 2^20-1
10. As the Intel 586 uses 32 address pins (bits), the largest size of
memory in bytes it can have is (in decimal)
2^32 = 2^2 * 2^10 * 2^20
4 * 1 Kilobyte * 1 Megabyte or 4 thousand million bytes
or 4 Gigabytes.
Consider a machine with a 32 Megabyte memory range. If the main memory
is divided into "segments" of 16 bytes.
11. The largest byte address in memory is
32 * 1 Megabyte
2^5 * 2^20 = 2^25, so there are 25 address lines.
The highest address is 1 1111 1111 1111 1111 1111 1111
1 F F F F F F
12 The largest segment number in memory is
If you have $100 in $10 bills, the number of $10 bills is 10
(just drop the last digit from the 100)
If the highest address is 1 1111 1111 1111 1111 1111 1111
then the highest segment is 1 1111 1111 1111 1111 1111
1 F F F F F