0% found this document useful (0 votes)
20 views4 pages

Intro Lab 6 - Numbers Conversion

Uploaded by

omarshoramail945
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views4 pages

Intro Lab 6 - Numbers Conversion

Uploaded by

omarshoramail945
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Akhbar El-Yom Academy

Computer Science Department - First Year


Course: Introduction To Computers

Lab (6)
Common numbering systems are:
 Binary [base = 2]:
Uses 2 symbols: 0 and 1.
 Decimal [base = 10]:
Uses 10 symbols: 0, 1, 2,…, 9.
 Hexadecimal [base = 16] : Base 16 A B C D E F
Uses 16 symbol: 0, 1, 2, …, 9, A, B, C, D, E, F.
Base 10 10 11 12 13 14 15
 Octal [base = 8]:
Uses 8 symbols: 0, 1, 2, …, 7.

Changing a Binary Number to a Decimal Number

Example: 1101.10112 = 1 x 23 +1 x 22 + 0 x 21 + 1 x 20 + 1 x 2-1+ 0 x 2-2 +1 x 2-3 +1 x 2-4


= 8 + 4 + 0 + 1 + 0.5 + 0 + 0.125 + 0.0625 = 13.687510
Now you try some:

100010112 = 139 (base 10)

1010.0112 = 10.375 (base 10)

Changing a Decimal Number to a Binary Number


Example: 15710=100111012
157/2 1
78/2 0
39/2 1
19/2 1
9/2 1
4/2 0
2/2 0
1/2 1 read
0

Now you try some:

13910 = 10001011 (base 2)

12.87510= 1100.111 (base 2)


Changing an Octal Number to a Decimal Number

Example: 537028 = 5 x 84 + 3 x 83 + 7 x 82 + 0 x 81 + 2 x 80= 2246610

Now you try some:

4368 = 286 (base 10)

362.358 = 242.453125 (base 10)

Changing a Decimal Number to an Octal Number

Example: 21510 =3278

215/8 7
26/8 2
3/8 3
0 read

Now you try some:

68210 = 1252 (base 8)

7.1610= 7.12172 (base 8)

Changing a Hexadecimal Number to a Decimal Number

Example: 537CA16 =5 x 164 + 3 x 163 + 7 x 162 + C x 161 + A x 160= 34186610

Now you try some:

EDA16 = 3802 (base 10)

42A.1216 = 1066.0703125 (base 10)

Changing a Decimal Number to a Hexadecimal Number

Example: 21510 = D716

215/16 7
13/16 13
0 read
Now you try some:

168210 = 692 (base 16)

12.87510= C.E (base 16)

Changing a Binary Number to a Hexadecimal Number

Example: 10010111012= 25D16

0010 0101 1101


2 5 13

Now you try some:

100010112 = 8B (base 16)

111011.0112 = 3B.6 (base 16)

Changing a Hexadecimal Number to a Binary Number

Example: A3D916 =10100011110110012

A 3 D 9
1010 0011 1101 1001

Now you try some:

29C16 = 1010011100 (base 2)

9E.AF216 = 10011110.101011110010 (base 2)

Changing a Binary Number to a Octal Number

Example: 11010010102=15128

I added two
zeroes on the left
to create a triad. 001 101 001 010
1 5 1 2

Now you try some:

100010112 = 213 (base 8)

1101.01112 = 15.34 (base 8)


Changing an Octal Number to a Binary Number
Example: 6300768=1100110000001111102

6 3 0 0 7 6
110 011 000 000 111 110

Now you try some:

2358 = 10011101 (base 2)

47.3218 = 100111.011010001 (base 2)

Changing a Hexadecimal Number to an Octal Number

Example: A4516= 51158

A 4 5
1010 0100 0101 (rewritten in binary)
101 001 001 101 (regrouped the binary digits into groups of three)
5 1 1 5

Now you try some:

A72E 16 = 123456 (base 8)

C.E16= 14.7 (base 8)

Changing an Octal Number to a Hexadecimal Number

Example: 54018= B0116

5 4 0 1
101 100 000 001 (rewritten in binary)
1011 0000 0001 (regrouped the binary digits into groups of four)
B 0 1

Now you try some:

2478 = A7 (base 16)

36.5328= 1E.AD (base 16)

You might also like