Binary and Hexadecimal |
|
To gain access to revision questions, please sign up and log in.
a
These are used in everyday life and are so familiar that many important features get forgotten.
One binary digit. A zero or a one.
dA group of eight bits. Computer data is usually stored and processed in bytes or pairs of bytes or even groups of four or eight bytes.
eThis is half a byte or four bits. The word was originally a joke but the term proved useful.
In an eight bit byte such as 11100111, the HIGH nybble is 1110 and the LOW nybble is 0111.
They are called low and high because the low nybble is worth 7 in decimal numbers and the high nybble is worth 224.
Nybble is often spelled nibble. Internet flame wars rage over this!
fIn this number: 11100111 the
Getting bits back to front causes serious errors so it's important to pay attention to this. This mistake crops up frequently when designing binary counters to reset on specific numbers like ten.
gMost exam questions will require conversions of only four bits.
The columns from left to right are worth 8, 4, 2 and 1. Column 8 is the MSB or most significant bit. Column 1 if the LSB or least significant bit. The binary counts from 0 to 15 and the zeros and ones indicate the presence or absence of the 8, 4, 2 or 1 depending on which column they are in. For example 0101 means No 8, yes 4, no 2 and yes 1. Add them up and you get 4 + 1 = five.
Decimal | Binary |
8 4 2 1 | |
0 | 0 0 0 0 |
1 | 0 0 0 1 |
2 | 0 0 1 0 |
3 | 0 0 1 1 |
4 | 0 1 0 0 |
5 | 0 1 0 1 |
6 | 0 1 1 0 |
7 | 0 1 1 1 |
8 | 1 0 0 0 |
9 | 1 0 0 1 |
10 | 1 0 1 0 |
11 | 1 0 1 1 |
12 | 1 1 0 0 |
13 | 1 1 0 1 |
14 | 1 1 1 0 |
15 | 1 1 1 1 |
Decimal | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
Binary | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | |
Yes/No | 0 | 0 | 32 | 16 | 0 | 0 | 0 | 1 | Total = 49 |
It does not take long to jot down this table. Then you can just look up the binary/hexadecimal conversions
Decimal | Binary |
8 4 2 1 | |
0 | 0 0 0 0 |
1 | 0 0 0 1 |
2 | 0 0 1 0 |
3 | 0 0 1 1 |
4 | 0 1 0 0 |
5 | 0 1 0 1 |
6 | 0 1 1 0 |
7 | 0 1 1 1 |
8 | 1 0 0 0 |
9 | 1 0 0 1 |
A | 1 0 1 0 |
B | 1 0 1 1 |
C | 1 1 0 0 |
D | 1 1 0 1 |
E | 1 1 1 0 |
F | 1 1 1 1 |
Converting Bigger Numbers
0011 | 0010 | 1001 | 1100 |
3 | 2 | 9 | C |
Here are some examples of hexadecimal numbers ...
0x3F9C | This notation is used by AQA, Microsoft Windows, C, C++, C# and Java programmers. |
&H3F9C | This notation is used by BASIC programmers |
$3F9C | This notation is used by Pascal programmers |
3F9C16 | This is how hexadecimal numbers are written in printed text. |
What is the biggest number that can be stored in a six bit memory location? | 26 - 1 = 63 |
If each pixel uses 24 bits to store the colour, how many colours are there? | 224 = 16.7 Million |
A computer has a 20 bit address bus. How many addresses can it access? | 220 = 1 Million |
A digital to analogue converter uses 8 bits. How many levels are available for the digitised signal? | 28 = 256 |
A microcontroller has a 14 bit word. 8 bits are used for data and six for instruction op-codes. How many op-codes could be available? | 26 = 64 |
How many colours are available if four but colour is being used? | 24 = 16 |
What is the biggest number that can be stored in a four bit latch? | 24 - 1 = 15 |
Monochrome displays use black and white. How many bits are needed to store each pixel? | 21 = 2 so only one bit is needed. |
reviseOmatic V3 Contacts, ©, Cookies, Data Protection and Disclaimers Hosted at linode.com, London