Professional Documents
Culture Documents
Lec 2 NumberSystems I
Lec 2 NumberSystems I
• Number systems can be classified into its sub-types based on the base of
that system.
• Base of a number system plays crucial role in understanding the number system and
to convert it from one sub-type to other sub-type.
2
Number Systems
3
Classification of Number Systems
5
Decimal System: Positional Notation
6
Decimal System: Positional Notation
=1000 + 200 + 30 + 1
= 1234
8
Decimal system
9
Applications of Decimal Number System
Daily Counting and Arithmetic:
• The decimal system is the most common way of counting and performing
arithmetic operations in our everyday lives.
• It's used for tasks like counting money, keeping track of quantities, and
performing calculations.
Measurement Units:
• Decimal numbers are used to represent measurement units, such as length,
weight, volume, and time.
• These measurements play a crucial role in fields like construction, science,
engineering, and cooking.
10
Applications of Decimal Number System
Currency and Finance:
• The decimal system is used to represent currency values, making it possible to
handle transactions, accounting, and financial calculations.
Education and Mathematics:
• The decimal system is fundamental to teaching and learning mathematics,
providing a clear way to explain place value and mathematical operations.
Scientific Notation:
• Decimal numbers are often used in scientific notation, where numbers are
expressed as a product of a decimal value and a power of 10.
• This notation simplifies representation of very large or very small numbers
encountered in fields like astronomy and physics.
11
Applications of Decimal Number System
Digital Clocks and Watches:
• Digital time displays use decimal digits to represent hours, minutes, and
seconds.
• This allows for precise timekeeping and ease of reading.
Calendars and Dates:
• The decimal system helps represent dates and time in months, days, and
years.
• It's used to manage schedules, appointments, and events.
12
Applications of Decimal Number System
Public Transportation:
• Timetables, schedules, and ticket prices are often represented using
decimal numbers for easy comprehension by the general public.
Commercial Transactions:
• Decimal numbers play a role in pricing, discounts, taxes, and other
financial aspects of buying and selling goods and services.
Medicine and Dosage:
• Decimal numbers are used to prescribe and administer medicine,
calculate dosages, and manage patient records.
13
Binary Number System
• Uses two digits, 0 and 1.
14
Converting Binary to Decimal
Example
Binary Number: 101012
Calculating Decimal Equivalent
15
Converting Binary to Decimal
What is the decimal equivalent of the binary number (1101110)2?
1 x 26 = 1 x 64 = 64
+ 1 x 25 = 1 x 32 = 32
+ 0 x 24 = 0 x 16 =0
+ 1 x 23 = 1x8 =8
+ 1 x 22 = 1x4 =4
+ 1 x 21 = 1x2 =2
+ 0 x 2º = 0x1 =0
= 110 in base 10
16
Converting Binary to Decimal
• Can you figure the decimal values for
these binary values?
• 11
• 101
• 110
• 1111
• 11011
17
Converting Binary to Decimal
18
Converting Decimal to Binary
• Convert decimal numbers to binary by repeated division by 2 and
noting remainders.
• Example: Convert 27 to binary:
• 27 ÷ 2 = 13 remainder 1, 2 27
• 13 ÷ 2 = 6 remainder 1, 2 13- 1
• 6 ÷ 2 = 3 remainder 0, 2 6 -1
• 3 ÷ 2 = 1 remainder 1. 2 3 -0
• 1 ÷ 2 = 0 remainder 1. 2 1- 1
• So, 27 in binary is 11011. 0 -1
19
Example
• Can you figure the binary values for these decimal values?
• 42
• 78
• 135
20
78 135
42
2 39 0 2 67 1
2 21 0
2 19 1 2 33 1
2 10 1
2 9 1 2 16 1
2 5 0
2 4 1 2 8 0
2 2 1
2 2 0 2 4 0
2 1 0
2 1 0 2 2 0
0 1
0 1 2 1 0
0 1
21
Example: To Do
• Decimal to Binary
• 89
• 31
• Binary to Decimal
• 1011
• 10001
• 1100
22
Example
• Decimal to Binary
• 89 -> 1011001
• 31 -> 11111
• Binary to Decimal
• 1011 -> 11
• 10001 -> 17
• 1100 -> 12
23
Applications of Binary System
• Binary in Computing:
• Computers use binary as their fundamental language due to the
simple representation of on/off states in electronic circuits.
• All data in computers, including text, images, and sound, are
ultimately represented in binary.
• Binary Arithmetic:
• Addition and subtraction in binary are similar to decimal, but with
carry and borrow rules.
• Multiplication and division are often more complex in binary,
involving shifts and bitwise operations.
24
Applications of Binary System
• Real-world Applications:
• Binary-coded information in barcodes, QR codes, and identification
numbers.
• Digital display technologies using segments that can be turned on/off (e.g.,
7-segment displays).
• Communication systems relying on binary signals for data transmission.
• Advantages of Binary:
• Simplicity of representation using only two symbols.
• Well-suited to electronic circuitry, where on/off states are easily
distinguishable.
• Easy conversion between binary and other number systems using powers
of 2.
25
Applications of Binary System
• Challenges:
• Longer representation compared to decimal for the
same values.
• Human readability can be challenging for longer
binary numbers.
• Performing manual arithmetic operations can be
more complex.
26
Octal Number System
• Uses eight digits, 0,1,2,3,4,5,6,7.
27
Octal to Decimal
Example
Octal Number − 125708
Calculating Decimal Equivalent −
28
Octal to Decimal
• Can you figure the decimal values for these octal values?
• 156
• 270
• 1164
• 2105
29
Octal to Decimal
• Here are the answers:
• 156 is (110)10
• 270 is (184)10
• 1164 is (628)10
• 2105 is (1093)10
30
Bases Higher than 10
How are digits in bases higher than 10 represented?
31
Hexadecimal Number System
• Uses 10 digits and 6 letters
• Letters represents numbers starting from 10:
• A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
• Also called base 16 number system.
• First position in a hexadecimal number represents a 0 power of the base
(16). Example 160.
• Last position in a hexadecimal number represents an x power of the base
(16). Example 16x where x represents the last position.
32
Hexadecimal to Decimal
Example −
Hexadecimal Number: 19FDE16
Calculating Decimal Equivalent −
.
Step Hexadecimal Number Decimal Number
4 3 2
Step 1 19FDE16 ((1 × 16 ) + (9 × 16 ) + (F × 16 )
1 0
+ (D × 16 ) + (E × 16 ))
4 3 2
Step 2 19FDE16 ((1 × 16 ) + (9 × 16 ) + (15 × 16 )
1 0
+ (13 × 16 ) + (14 × 16 ))
Step 3 19FDE16 (65536 + 36864 + 3840 + 208 +
14)
Step 4 19FDE16 (106462)10
33
Hexadecimal to Decimal
• Can you figure the decimal value for these
hexadecimal values?
• 2A
• 15F
• A7C
• 11BE
• A10D
34
Hexadecimal to Decimal
• Here are the answers:
• 2A is 42 in base 10
• 15F is (351)10
• A7C is (2684)10
• 11BE is (4542)10
• A10D is (41229)10
35