|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
We have considered the binary number system (base 2):
The above represents decimal 22.
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)?
Here is another pdf worksheet for this section.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. © 2001 - 2009 Richard Jones, PO BOX 246, Cambridge, New Zealand;
This page was last modified: October 28, 2013