Chapter#1 PDF
Chapter#1 PDF
The denary number system, also known as the decimal system, is a base-
10 numbering system that uses 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9
Denary numbers can be used to represent any quantity, including whole
numbers, fractions, and decimals
Each digit in a denary number represents a power of 10, with the rightmost digit
representing 100, the next representing 101, and so on
It is necessary to convert data from one number system to another eg. denary to
binary or denary to hexadecimal
It is much easier to do conversions with a table:
o The number 3268 (three thousand two hundred and sixty-eight) can be
represented in the following table:
The binary number system is a base-2 numbering system that uses only two
digits: 0 and 1
Each digit in a binary number represents a power of 2, with the rightmost digit
representing 20, the next representing 21, and so on.
Eg: the number 12 represented in binary is 1100:
You need to be able to make conversions in both directions, e.g. denary to binary
or binary to denary. Make sure you write the table the correct way round (with 1 in
the right hand column) & use the correct number of bits in your answer (the
question should tell you but use multiples of 4 bits if you’re not sure)
Write down the powers of 2 in binary from right to left, starting with 20 (1), 21 (2),
22 (4), 23 (8), and so on, until you reach 128 (as answers must be given in 8 bits)
0 0 1 0 1 0 1 1
128 64 32 16 8 4 2 1
1 0 1 0 1 0 1 1
Write down the powers of 2 in decimal from right to left, starting with 20 (1),
21 (2), 22 (4), 23 (8), and so on, until you reach 128 (as answers must be given in
8 bits)
128 64 32 16 8 4 2 1
Starting from the leftmost column, write the binary digit in the column if it is a 1
write 1, and write 0 if it is a 0.
128 64 32 16 8 4 2 1
0 1 1 0 0 1 1 0
Exam Tip
If the question tells you to show your working you will get a mark for this so don't
forget to write down yours
Group the binary digits into groups of 4, starting from the rightmost digit. If
there are not enough digits to make a group of 4, add leading zeros as needed.
8 4 2 1 8 4 2 1
0 1 1 0 1 1 1 0
To convert a Hex number like A2 into binary write each hex digit in 4-bit binary
A=10
8 4 2 1 8 4 2 1
1 0 1 0 0 0 1 0
1. Divide the decimal number (in this example 57) by 16 and write down the answer
including the remainder:
57 ÷ 16 = 3 remainder 9
2. If the remainder is above 9, replace this with the corresponding letter
3. Repeat steps 1 and 2 until the number you’re dividing is zero:
3 ÷ 16 = 0 remainder 3
4. Write the hexadecimal values from step 3 to step 1 in reverse order:
39
Alternatively, you can turn your denary number into binary, and then turn
the binary number into hexadecimal:
0 0 1 1 1 0 0 1
8 4 2 1 8 4 2 1
0 0 1 1 1 0 0 1
2+1=3 8+1=9
Answer is 39
Write down the place value of each digit in the number, starting from the right and
increasing by a power of 16:
161 160
16 1
If the hex digit is a letter, convert it to its denary equivalent (Using the following table to
help you):
Hexadecimal Decimal
A 10
B 11
C 12
D 13
E 14
F 15
16 1
E 5
Multiply each decimal value by its corresponding place value, and sum the products:
Alternatively, you can turn your hexadecimal number into binary, and then turn
the binary number into denary:
8 4 2 1 8 4 2 1
1 1 1 0 0 1 0 1
128 64 32 16 8 4 2 1
1 1 1 0 0 1 0 1
128+64+32+4+1=229
Exam Tip
When doing conversions don’t remove any 0s on the right hand side of your answer as
this will cost you marks. E.g. B0 isn’t the same as B, just like 30 isn’t the same as 3.
Hexadecimal
Why Use Hexadecimal?
IP addresses:
o Hexadecimal values can be used to represent each set of numbers in an
IP address
ASCII / Unicode: eg. The letter "A" is represented in ASCII as the decimal
value 65, which is equivalent to the binary value 01000001. This binary value
can also be represented in hexadecimal as the value 41
Assembly language:
o Hexadecimal values are used in assembly language to represent the
binary code for the instructions and data
o Each instruction or data value is represented by a specific sequence of
hexadecimal digits, which can make it easier for programmers to read and
understand the code
o Eg. "MOV AX, 5" instruction is represented by the hexadecimal value
"B805", which tells the computer to move the value 5 into register AX
URLs:
o To encode a space in a URL using hexadecimal, the space character is
replaced by a percent sign ("%") followed by the hexadecimal value of
the space character. In ASCII, the space character has a decimal value
of 32, which can be represented in hexadecimal as "20".
o So, to encode the URL "my website.com/page one" using hexadecimal,
it would look like this: my%20website.com/page%20one
Exam Tip
When a question is asked which asks you to name a certain number of uses of
hexadecimal, ensure you write the number asked for and no more. E.g. name 3
uses of hexadecimal - if you write more than 3, the last ones will be ignored by
the examiner, even if they’re correct
If you're asked to name any uses of hexadecimal, don't write down any given in
the question as you won't get marks for this