In: Computer Science
Express the binary strings in the left column of the following table in hexadecimal notation in the right column of the table.
Binary string |
Binary string expressed in hexadecimal notation |
1111000011110000 |
|
1010111010101110 |
|
1111000111011111 |
|
11110000110110001101 |
|
10001100111011111000 |
Add the bit strings in the first two columns of the following table and report the answer in the last column in binary notation.
Bit string 1 |
Bit string 2 |
Result of the addition in binary notation |
111101 |
111110 |
|
100010 |
110011 |
|
111011 |
101111 |
|
110001 |
100001 |
|
1111101 |
1001111 |
Binary Number: Combination or pair of two digits 0 and 1 is called binary number. it is used in digital communication and networking.
Binary representation of Decimal number:
Binary number is multiplication of power of 2 i.e (2n).
Ex--> so on upto n .........26 ,25 ,24 ,23 ,22 ,21 , 20 (we write it from right to left to make a binary number)
Lets consider a decimal number 16 and conver it into binary notation with the help of multiplication of power of 2.
step1: 9 ---> 8, 4, 2,1 (here we 8 and 1 to get 9 [8+1=9])
23 ,22 ,21 , 20(break the number in to multiple of 2).
step2: 9----> 8 , 4,2,1 (Put 1 at 1 and 1 at 8 hence aading of 8 and 1 we will get 9.)
1, , , 1
Step3: 9----> 1,0,0,1 (here we dont need 4 and 2 to get 9 so after that put every weher 0)
Note: - Ignore commas(,) in step3
Decimal | Binary |
0 | 000 |
1 | 001 |
2 | 010 |
3 | 011 |
4 | 100 |
5 | 101 |
....so on | ...so on |
Hexadecimal Number: Hexadecimal number is a combination of 6(Hexa) alphabet(A,B,C,D,E,F) and 9 decimal numbers. hence it has only 16 symbols − 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 , A, B, C, D, E, F. where A, B, C, D, E and F are single bit representations of decimal value 10, 11, 12, 13, 14 and 15 respectively.
Binary representation of Hexadecimal number:
Decimal number | Binary |
0 | 0000 |
1 | 0001 |
2 | 0010 |
3 | 0011 |
4 | 0100 |
5 | 0101 |
6 | 0110 |
7 | 0111 |
8 | 1000 |
9 | 1001 |
A(10) | 1010 |
B(11) | 1011 |
C(12) | 1100 |
D(13) | 1101 |
E(14) | 1110 |
F(15) | 1111 |
Solution of the above question:
Express the binary strings in the left column of the following table in hexadecimal notation in the right column of the table.
1. 1111000011110000
Step1: ( ( 1111 ) ( 0000 ) ( 1111 ) ( 0000 ) )16Make the 4 bit pair of given number
Step2: Now consider the above decimal to Hexadecimal table and match the notation/number from that table and write it as it is here with base value 16.
so according to table 1111 is the representation of F and 0000 is for 0(zero). so we will replace these vale with 4 bit pair of the given number.
step3: hence final hexadecimal number of givine binary number is (F0F0)16
Note: You can do it with above binary number example without taking help of hexadecimal table also in case you dont remember the table.
Further solution of given binary notations are similar like this:
Binary String | 4-bit pair | Expressedin Hexadecimal notaion |
1010111010101110 | (1010 1110 1010 1110)16 | (AEAE)16 |
1111000111011111 | (1111 0001 1101 1111)16 | (F1DF)16 |
11110000110110001101 | (1111 0000 1101 1000 1101)16 | (F0D8D)16 |
10001100111011111000 | (1000 1100 1110 1111 1000)16 | (8CEF8)16 |
2. Add the bit strings in the first two columns of the following table and report the answer in the last column in binary notation.
Rules of Binary Addition:
A + B | Sum | Carry |
0 + 0 | 0 | 0 |
0 + 1 | 1 | 0 |
1 + 0 | 1 | 0 |
1 + 1 | 0 | 1 |
Here at the last row 1 + 1 = 10 but we write 0 only and it carry 1.
example-->
1 1 1 <---------- Carry
1 1 1 1 0 1
+ 1 1 1 1 1 0
1 1 1 1 0 1 1
further similarly for other given binary notataion:
String1 | Addition | string2 | Result |
100010 | + | 110011 | 01010101 |
111011 | + | 101111 | 01101010 |
110001 | + | 100001 | 01010010 |
1111101 | + | 1001111 | 011001100 |
Note : if above solution helped you understand the concept of binary and hexadecimal notation then like and commen on this post.