0% found this document useful (0 votes)
25 views

Conversions

The document discusses different numbering systems including binary, octal, decimal, and hexadecimal. It explains how to convert between these numbering systems by placing values in columns corresponding to place values and then summing the columns. Methods covered include conversion from binary, octal, and hexadecimal to decimal as well as from decimal to these other bases.

Uploaded by

alyayman108
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Conversions

The document discusses different numbering systems including binary, octal, decimal, and hexadecimal. It explains how to convert between these numbering systems by placing values in columns corresponding to place values and then summing the columns. Methods covered include conversion from binary, octal, and hexadecimal to decimal as well as from decimal to these other bases.

Uploaded by

alyayman108
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Numbering Systems

• The position of each digit in a weighted number system is assigned a


weight based on the base or radix of the system.
• The radix of decimal numbers is ten, because only ten symbols (0
through 9) are used to represent any number.

Numbering Radix Digits Range


System /Base
Binary 2 0,1

Octal 8 0-7

Decimal 10 0-9

HexaDecimal 16 0-9 ,A,B,C,D,E,F


Any Base to Decimal Conversion
Binary Decimal

• The column weights of binary numbers are powers of two


that increase from right to left beginning with 20 =1:
…25 24 23 22 21 20.
• For fractional binary numbers, the column weights are
negative powers of two that decrease from left to right:
22 21 20. 2-1 2-2 2-3 2-4 …
Any Base to Decimal Conversion
Binary Decimal

• The decimal equivalent of a binary number can be


determined by multiplying each bit by its corresponding
weight and then add the values of all.
Convert the binary number 100101.01 to decimal.
Start by writing the column weights; then add the
weights that correspond to each 1 in the number.
25 24 23 22 21 20. 2-1 2-2
32 16 8 4 2 1 . ½ ¼
* * * * * * * *
1 0 0 1 0 1. 0 1

32+0+0 +4 +0+ 1 +0 +¼ = 37.25


Any Base to Decimal Conversion
Binary Decimal

Convert the binary number 1101.11 to decimal.

Start by writing the column weights; then add the


weights that correspond to each 1 in the number.
23 22 21 20. 2-1 2-2
8 4 2 1. ½ ¼
1 1 0 1. 1 1
8 + 4 +0 +1 + 1/2+1/4 = 13.75
Any Base to Decimal Conversion
Octal Decimal

Convert the octal number 174.1 to decimal.

Start by writing the column weights; then add the


weights that correspond to each number.
82 81 80. 8-1
64 8 1 . 1/8
1 7 4. 1
64+56+4 +1/8= 124.125
Any Base to Decimal Conversion
Hexadecimal Decimal

Convert the hexadecimal number A01.1 to decimal.

Start by writing the column weights; then add the


weights that correspond to each number.
162 161 160. 16-1
256 16 1 . 1/16
10 0 1. 1
2560+0+1 +1/16= 2561.0625
Decimal to Any Base Conversion
Decimal Binary

• You can convert a decimal whole number to binary by


reversing the procedure. Write the decimal weight of each
column and place 1’s in the columns that sum to the
decimal number.
Convert the decimal number 49 to binary.
The column weights double in each position to the
right. Write down column weights until the last
number is larger than the one you want to convert.
26 25 24 23 22 21 20.
64 32 16 8 4 2 1.
0 1 1 0 0 0 1.
Decimal to Any Base Conversion
Decimal Binary

• You can also convert decimal to any other base by repeatedly


dividing by the base. For binary, repeatedly divide by 2:
Convert the decimal number 49 to binary by
repeatedly dividing by 2.
You can do this by “reverse division” and the
answer will read from left to right. Put quotients to
the left and remainders on top.
Answer: remainder
1 1 0 0 0 1
0 1 3 6 12 24 49 2
Continue until the Decimal
Quotient base
last quotient is 0 number
Decimal to Any Base Conversion
Decimal Binary

• You can convert a decimal fraction to binary by repeatedly


multiplying the fractional results of successive
multiplications by 2. The carries form the binary number.
Convert the decimal fraction 0.188 to binary by
repeatedly multiplying the fractional results by 2.
0.188 x 2 = 0.376 carry = 0 MSB
0.376 x 2 = 0.752 carry = 0
0.752 x 2 = 1.504 carry = 1
0.504 x 2 = 1.008 carry = 1
0.008 x 2 = 0.016 carry = 0
Answer = .00110 (for five significant digits)
Decimal to Any Base Conversion
Decimal Octal

• You can also convert decimal to any other base by repeatedly


dividing by the base. For octal, repeatedly divide by 8:
Convert the decimal number 47 to octal by
repeatedly dividing by 8.
You can do this by “reverse division” and the
answer will read from left to right. Put quotients to
the left and remainders on top.
remainder
Answer: 5 7
0 5 47 8
Continue until the Decimal
Quotient base
last quotient is 0 number
Decimal to Any Base Conversion
Decimal Hexadecimal

• You can also convert decimal to any other base by repeatedly


dividing by the base. For hexadecimal, repeatedly divide by 16:
Convert the decimal number 125 to hexadecimal by
repeatedly dividing by 16.
You can do this by “reverse division” and the
answer will read from left to right. Put quotients to
the left and remainders on top.
Answer: 7 D remainder
0 7 125 16
Continue until the Decimal
Quotient base
last quotient is 0 number
Summary Decimal Binary
Number Number

Binary Numbers 0 0000


1 0001
• A binary counting sequence for 2 0010
numbers from zero to fifteen is shown. 3 0011
4 0100
• Notice the pattern of zeros and 5 0101
ones in each column. 6 0110
• Digital counters frequently have this 7 0111
8 1000
same pattern of digits: 9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
Decimal Binary Octal Hexadecimal
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
Binary to Octal Conversion

• Octal uses eight characters the numbers 0 through 7 to


represent numbers.
• Binary number can easily be converted to octal by
grouping bits 3 at a time and writing the equivalent octal
character for each group.
Express 1 001 011 000 001 1102 in octal:

1 1 3 0 1 68
Binary to Hexadecimal Conversion

• Hexadecimal uses 16 characters the numbers 0 through 9


and from A to F to represent numbers.
• Binary number can easily be converted to Hexadecimal
by grouping bits 4 at a time and writing the equivalent
octal character for each group.

Express 1001 0110 0000 11102 in hexadeimal:

9 6 0 E16
Octal to Binary Conversion
• Octal number can easily be converted to binary by expanding
each digit into 3 bits at a time

Express1078 in binary:

001 000 1112

Hexadecimal to Binary Conversion


• Hexadecimal number can easily be converted to binary by
expanding each digit into 4 bits at a time.
Express7B12 in binary:

0111 10112

You might also like