Professional Documents
Culture Documents
Number Conversion Student
Number Conversion Student
Decimal,Binary
2nd Semester, SY 2023-2024
Bridging the Gap
1 6 23
6343 721 93355 3 16 6 3
2
Decimal-to-Binary
5 9
935
935
721 534 Conversion
234142715 37 2
1 3 75 3 4
5 7 1452
01 1 00
1 001 11
0 01 0 1 010 01100001
0
0 110 01
1 10 01
0 01 1
1
00100
1 1 0 0 1 10
0
1 10 1100 1
01
001
0 11 0 1 0 011 101
01 0 1 1 01
Binary-to-Decimal 11 0010 0010
0 1 1011
01 101 110 0
Conversion 1
010111101 100101011
1
0 1
1 001
0
0 1 011 1 00
011 1
00101
0 1 01
1 011 0
00
1 0100
2
Conversion Among Bases
• The possibilities:
Decimal Octal
Binary Hexadecimal
pp. 40-46
Conversion Among Bases
• Decimal to Binary & Binary to Decimal:
Decimal
Binary
pp. 40-46
• In the decimal number systems each of
the ten digits, 0 through 9, represents a
certain quantity.
• The position of each digit in a decimal
number indicates the magnitude of the
quantity represented and can be
assigned a weight.
• The weights for whole numbers are
positive powers of ten that increases
from right to left, beginning with 10º = 1
• ……………105 104 10³ 10² 10¹ 10º 5
Decimal ‒to‒ Binary Conversion
The Process : Successive Division
– Write down the decimal number.
– Divide the number by 2.
– Write the result underneath.
– Write the remainder on the right hand side. This
will be 0 or 1.
– Divide the result of the division by 2 and again
write down the remainder.
– Continue dividing and writing down remainders until
the result of the division is 0.
6
Decimal ‒to‒ Binary Conversion
The Process (cont’d) : Successive Division
– The first remainder is considered as the Least
Significant bit (LSB)
– The last remainder is the Most Significant Bit
(MSB).
– Read the series of 1’s and 0’s as the result of the
remaider – that will be the binary equivalent of the
decimal number.
7
Decimal ‒to‒ Binary Conversion
3
2 6 r 0 Least Significant Bit
1
2 3 r 1
0
2 1 r 1 Most Significant Bit
8
Dec → Binary : Example #2
Convert the decimal number 2610
into its binary equivalent.
9
Solution : Example #2
Solution:
13
2 26 r 0 LSB 2610 = 110102
6
2 13 r 1
3
2 6 r 0
1
2 3 r 1
0
2 1 r 1 MSB
10
Dec → Binary : Example #3
Example:
Convert the decimal number 4110 into
its binary equivalent.
11
Solution : Example #3
Solution:
20
2 41 r 1 LSB 4110 = 1010012
10
2 20 r 0
5
2 10 r 0
2
2 5 r 1
1
2 2 r 0
0
2 1 r 1 MSB
12
Dec → Binary : Assignment
a) 1310 = ?
b) 2210 = ?
c) 4310 = ?
d) 15810 = ?
13
BINARY TO DECIMAL
14
Binary ‒to‒ Decimal Process
The Process : Weighted Multiplication
a) Multiply each bit of the Binary Number by it corresponding bit-
weighting factor (i.e. Bit-0→20=1; Bit-1→21=2; Bit-2→22=4; etc).
b) Sum up all the products in step (a) to get the Decimal Number.
Example:
Convert the binary number 01102 into its decimal equivalent.
0 1 1 0
23 22 21 20
Bit-Weighting 0110 2 = 6 10
8 4 2 1 Factors
0 + 4 + 2 + 0 = 610
15
Converting Base-2 to Base-10
1( 0 0 1 2 ) 1
OFF
ON
OFF
ON
ON
ON/OFF
:Exponent 24 23 22 21 20
16 0 0 2 1
:Calculation + + + + =
10) 19 (
16
Binary → Dec : Example #1
Example:
Solution:
1 0 0 1 0
24 23 22 21 20
16 8 4 2 1
16 + 0 + 0 + 2 + 0 = 1810
100102 = 1810
18
Binary → Dec : Example #2
Example:
Convert the binary number 01101012 into its decimal
equivalent.
19
Binary → Dec : Example #2
Example:
Convert the binary number 01101012 into its decimal
equivalent.
Solution:
0 1 1 0 1 0 1
26 25 24 23 22 21 20
64 32 16 8 4 2 1
0 + 32 + 16 + 0 + 4 + 0 + 1 = 5310
01101012 = 5310
20
Decimal to Octal
Octal number:
21
Decimal to Octal : Steps
22
Decimal to Octal
24
Decimal to Octal
56710 to 122810
•Convert to Octal
•Decimal to Hexa
•Show the process
•Pls refer to slide #22 to 25 (lesson re:
Decimal to Octal)
26
Decimal-to-Hexadecimal Conversion
• Hexa is base 16
• Repeated division of a decimal number by 16 will
produce the equivalent hexadecimal number,
formed by the remainders of the divisions.
• The first remainder produced is the least significant
digit (LSD).
• Each successive division by 16 yields a remainder
that becomes a digit in the equivalent hexadecimal
number. When a quotient has a fractional part, the
fractional part is multiplied by the divisor (16) to get
the remainder.
27
• In Decimal to Hexa conversion .pls refer to the
table below:
28
Decimal-to-Hexadecimal Conversion
29
Decimal-to-Hexadecimal Conversion
Example: 96010 to a hexadecimal number
follow the steps given below:
1) First, divide 960 by 16.
960 ÷ 16 = 60 and remainder = 0
2) Again, divide quotient 60 by 16.
60 ÷ 16 = 3 and remainder 12.
3) Again dividing quotient 3 by 16, will leave quotient=0 and
remainder = 3.
4) Now taking the remainder in reverse order and substituting the
equivalent hexadecimal value for them, we get,
3 = 3, 12 = C and 0 = 0
•Therefore, 96010 = 3C016
30
References:
• Microsoft, Inc. (2022). Clip Art. Retrieved
January 15, 2023 from
http://office.microsoft.com/en-us/clipart/default.a
spx
• https://owlcation.com/stem/How-to-Convert-Deci
mal-to-Binary-and-Binary-to-Decimal
• https://byjus.com/maths/decimal-to-hex-conversi
on/
31