logo

Working with Different Number Representations

   

Added on  2023-06-04

11 Pages2756 Words354 Views
 | 
 | 
 | 
Question 1 (30 Marks)
This question allows you to demonstrate your ability to work with different numbers representations
that were introduced in this module. In each case, you must show your working to gain full marks. By all
means use a calculator to check that your answers are correct, but it will be very useful for you to be
able to manipulate these types of numbers without using a calculator
A. You have learned that a MAC address is a unique device-specific address for each device in all
networks. Here is a MAC address in binary notation, but a MAC address is more usually shown in
hexadecimal notation. Convert the following binary MAC address to hexadecimal form by
converting each binary octet into its hexadecimal equivalent. You must show your full marks.
10111111-10111100-11111111-00001111-11110000-10101010
(6marks)
DECIMAL 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
HEXADECIMAL 0 1 2 3 4 5 6 7 8 9 A B C D E F
Dividing each octet number into two parts of four binaries and then converting them into decimal. The
first four binary will represent the first hexadecimal value.
Converting into binary
1011 1111 -
Now we add the decimal values obtained from each part separately
8 + 0 + 2 + 1 = 11 8 + 4 + 2 + 1 = 15
From our table above the decimal 11 is equivalent to hexadecimal B and 15 is equivalent to F. Therefore
our octet 10111111 = BF
1011 1100 -
8 + 0 + 2 + 1 = 11 8 + 4 + 0 + 0 = 12
From our table above the decimal 11 is equivalent to hexadecimal B and 15 is equivalent to F. Therefore
our octet 10111100 = BC
1 1 1 1
23 22 21 20
8 4 2 1
1 0 1 1
23 22 21 20
8 0 2 1
1 1 0 0
23 22 21 20
8 4 0 0
1 0 1 1
23 22 21 20
8 0 2 1
Working with Different Number Representations_1

1111 1111 -
8 + 4 + 2 + 1 = 15 8 + 4 + 2 + 1 = 15
From our table above the decimal 15 is equivalent to hexadecimal F and 15 is equivalent to F. Therefore
our octet 11111111 = FF
0000 1111 -
0 + 0 + 0 + 0 = 0 8 + 4 + 2 + 1 = 15
From our table above the decimal 0 is equivalent to hexadecimal 0 and 15 is equivalent to F. Therefore
our octet 11111111 = 0F
1111 0000 -
8 + 4 + 2 + 1 = 15 0 + 0 + 0 + 0 = 0
From our table above the decimal 15 is equivalent to hexadecimal F and 0 is equivalent to 0. Therefore
our octet 11110000 = F0
1010 1010 -
8 + 0 + 2 + 0 = 10 8 + 0 + 2 + 0 = 10
From our table above the decimal 10 is equivalent to hexadecimal A and 10 is equivalent to A. Therefore
our octet 10101010 = AA
Therefore the binary 10111111-10111100-11111111-00001111-11110000-10101010 in hexadecimal is
BF – BC – FF – 0F – F0 – AA
1 1 1 1
23 22 21 20
8 4 2 1
1 1 1 1
23 22 21 20
8 4 2 1
0 0 0 0
23 22 21 20
0 0 0 0
1 1 1 1
23 22 21 20
8 4 2 1
0 0 0 0
23 22 21 20
0 0 0 0
1 1 1 1
23 22 21 20
8 4 2 1
1 0 1 0
23 22 21 20
8 0 2 0
1 0 1 0
23 22 21 20
8 0 2 0
Working with Different Number Representations_2

B. Convert the following hexadecimal MAC address to its binary form. Again, show your working:
BA-AD-C1-5C-00-AC
(6 marks)
DECIMAL 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
HEXADECIMAL 0 1 2 3 4 5 6 7 8 9 A B C D E F
BA – 11 and 10. From the powers of two we look for a combination that when added will make up the
binary numbers 11 and 10 respectively. The numbers that add up we put a 1 and the rest 0.
11 -
10 -
Therefore BA as binary is 10111010
AD – 10 and 13.
10 -
13 -
Therefore AD as binary is 10101101
C1 – 12 and 1
12 -
1 -
Therefore C1 as binary is 11000001
8 4 2 1
1 0 1 1
8 4 2 1
1 0 1 0
8 4 2 1
1 0 1 0
8 4 2 1
1 1 0 1
8 4 2 1
1 1 0 0
8 4 2 1
0 0 0 1
Working with Different Number Representations_3

5C – 5 and 12
5 -
C -
Therefore 5C as binary is 101100
00 – 0 and 0
0 -
0 -
Therefore 00 as binary is 0
AC – 10 and 12
10 -
12 -
Therefore AC as binary is 10101100
The following hexadecimal BA-AD-C1-5C-00-AC converted into binary is
10111010 - 10101101 - 11000001 - 101100 - 0 – 10101100
8 4 2 1
0 1 0 1
8 4 2 1
1 1 0 0
8 4 2 1
0 0 0 0
8 4 2 1
0 0 0 0
8 4 2 1
1 0 1 0
8 4 2 1
1 1 0 0
Working with Different Number Representations_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents