|
|
||
| You are here: | ||
|
3.5.3 Number systems
In the IB Computer Science program we are only interested in binary , decimal and hexadecimal (base 16).
Any binary byte can be represented as 2 hexadecimal digits by substituting in the above table. Our old buddy 22 - 00010110 becomes 16 in hexadecimal 0001 0110
|
On this page: [ number systems | intro to architecture ] We have considered the binary number system (base 2):
The above represents decimal 22. Number systems
Hexadecimal is interesting because it can be used as a shorthand form of binary, as follows:
Try a quick conversion quiz: Source code for this Applet NB: do not type leading zeroes in answers (especially binary) As we mentioned in the first worksheet, 24-bit colour is often used to represent colours in a modern system. That is 3 binary bytes, each byte stands for red component, green component, blue component (RGB colour). Graphically:
So, each colour can be described in 6 hex digits. FFFFFF is white. What colours do you think these hex numbers represent? a) FF0000 b) 00FF00 c) 000000 What might be the code for cyan (an equal mixture of blue and green)? The ASCII code for a space is 20 in hexadecimal; what is it in decimal? The ASCII code for the letter A is 65 in decimal. What is it in binary?
Each bit is sent along a wire/circuit so 4 sets of wires would be needed in this computer. The group of wires/circuits is called a bus . Buses carry data and addresses. Computers typically have 32, 64 or 128 bit buses. How many different addresses can a computer with a 32-bit bus have? How much is that in Megabytes (MB)? related: [ Core home | previous: representation | next: analog/digital ] |
Here is another pdf worksheet for this section. |
|
|
|||
|
Questions or problems related to this web site should be addressed to Richard Jones who asserts his right to be identified as the author and owner of these materials - unless otherwise indicated. Please feel free to use the material presented here and to create links to it for non-commercial purposes; an acknowledgement of the source is required by the Creative Commons licence. Use of materials from this site is conditional upon your having read the additional terms of use on the about page and the Creative Commons Licence. View privacy policy. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. © 2001 - 2007 Richard Jones, PO BOX 246, Cambridge, New Zealand; This page was last modified: July 29, 200823, 2008 |