Presentation is loading. Please wait.

Presentation is loading. Please wait.

D75P 34 – HNC Computer Architecture Interim Week Hexadecimal revisited! © C Nyssen/Aberdeen College 2003 All images © C Nyssen/Aberdeen College except.

Similar presentations


Presentation on theme: "D75P 34 – HNC Computer Architecture Interim Week Hexadecimal revisited! © C Nyssen/Aberdeen College 2003 All images © C Nyssen/Aberdeen College except."— Presentation transcript:

1 D75P 34 – HNC Computer Architecture Interim Week Hexadecimal revisited! © C Nyssen/Aberdeen College 2003 All images © C Nyssen/Aberdeen College except where stated Clipart on slide 2 © www.clipart.com with non-distribution licence Prepared 29/9/03www.clipart.com

2 In order to complete the Memory Map assessment question, you must first be very, very familiar with decimal – hexadecimal conversions.

3 Hexadecimal means a “number base” of 16, from “hex” meaning 6, and “decimal”, meaning 10. It is used solely as a convenient translation “language” from the computer’s native counting language – binary – to ours, decimal. So although a computer “thinks” in binary, it displays the results in hex!

4 The ancient Egyptians used 12…. The Greeks and Arabs used 10… The Romans did not use number bases at all! So although they were good at building, painting and administration, they never developed complex mathematical systems as the Greeks and Arabs did. The Ancient Babylonians used number bases of 60….

5 We already saw that computers are very basic things – they can only recognise two states, thus giving us the term “binary”. They can accomplish quite a lot with just two states, though – combinations of binary digits can be used to represent ….

6 Numbers….. … Letters … Colours … …and many other things besides!

7 Unfortunately for us, although computers can handle large strings of similar looking numbers….. …the human eye gets very confused when presented with large groups of identical-looking objects!

8 This is part of a program written for one of the first electronic computers, the Manchester Mark 1, in 1948. In those days all programming was done in binary. This was very tedious and prone to lots of errors!

9 So nowadays we convert the binary stored by the computer into hex, to make it easier to read and understand. 1101 1111 0000 0100

10 To convert a decimal number – 7896532 - to hexadecimal … …start by dividing by 16 … …and continue until you run out of numbers. (When dividing, just do the whole numbers, ignore the remainders for the moment…)

11 Now we turn our attention to the remainders – multiply them all by 16 to get the red column on the right….. …read from the BOTTOM UP to get 787DD4h … …or 0111 1000 0111 1101 1101 0100 in binary!

12 To convert from hex - DC0Fh - to decimal, you have to do some multiplying …. Hexadecimal number base – powers of 16. 65536’s4096’s256’s16’s1’s D or 13C or 120F or 15 (13 x 4096) + (12 x 256) + (0 x 16) + (15 x 1) = 56,335. The binary equivalent would be 1101 1100 0000 1111.

13 1. Work out how much memory can be addressed. This is always 2 number of address lines. The top address will always be this number – 1. When writing your memory map, you can follow this sequence ….

14 2. Notice how big the memory locations are. (They might not always be one byte!) This could be important when working out sizes later. Draw a column and label it from 0 – top address.

15 3. Now begin to fill in the bits. The question might take different forms. “Bootstrap code begins at 0 and uses 32 bytes. Assume 1 byte per address.” Starting from 0, the top address will be NOT 32 but 31. Remember 0 counts as a number!

16 “I/o starts from 30h and uses 64 bits. Assume 2 bytes per address” Conversions …  8 bits in a byte (nowadays!)  1024 bytes in a kilobyte  1024 kilobytes in a megabyte This block uses 8 bytes, and each address uses 2 bytes. So the actual locations used will be 30h to 33h!

17 “The top 32 kb are used for the algorithm. Assume 16 address lines and 1 byte per address.” The top address will be (2 16 – 1) = 65535, or FFFFh. 32kb is equivalent to (32 x 1024) = 32768 bytes, or locations. Counting down, this gives us a starting point of 32768, or 8000h.

18 Note that if the space occupied is an even number of addresses, and it starts from an odd number, it must always end on an even one (and vice versa).

19 Remember to label all your used blocks and free space! The essential bits…  The top address must be correct!  There will be at least two contiguous blocks.  There must be a full set of hex or decimal figures.

20 Summary Although computers store things as binary values, they display things in hexadecimal. This is important when describing a Memory Map. The top address will be (2 address bus width – 1). Fill in the used memory as directed in the question. Finally, label all the used blocks and free space.


Download ppt "D75P 34 – HNC Computer Architecture Interim Week Hexadecimal revisited! © C Nyssen/Aberdeen College 2003 All images © C Nyssen/Aberdeen College except."

Similar presentations


Ads by Google