CH 07 Number System
CH 07 Number System
By Rabia Yousaf
Number systems: BIT and Byte:
• A manner of • BIT stands for
counting Binary digIT
• Several different • Binary numbers
number systems are made of bits
exist • Bit represents a
• When we type switch
some letters or • A byte is 8 bits
words, the
computer • Byte represents
translates them in one character
numbers as
computers can
understand only
numbers
Classification chart of of Number
Systems
Positional
Number
System
Non-
Binary Positional
Number Number
System System
Octal
Number
System
Decimal
Number
System
Hexa-
Decimal
Number
System
Non-positional Number
Systems
• Characteristics
• Use symbols such as I for 1, II for 2, III for 3, IIII
for 4, IIIII for 5, etc
• Each symbol represents the same value regardless
of its position in the number
• The symbols are simply added to find out the value
of a particular number
• Difficulty
• It is difficult to perform arithmetic with such a
number system
Positional Number
Systems
• A computer can understand positional number
system where there are only a few symbols
called digits and these symbols represent
different values depending on the position
they occupy in the number.
• A value of each digit in a number can be
determined using
1. The digit
2. The position of the digit in the number
3. The base of the number system (where base
is defined as the total number of digits
available in the number system).
• Decimal number • Binary number
system system
• Used by humans • Used by
to count computers to
• Contains ten count
distinct digits • Two distinct
• Digits combine to digits, 0 and 1
make larger • 0 and 1 combine
numbers to make numbers
Positional
Decimal NumberNumber
BinarySystems
Number
System System
• A positional number • A positional number
system system
• Has 10 symbols or digits • Has only 2 symbols or
(0, 1, 2, 3, 4, 5, 6, 7,8, 9). digits (0 and 1). Hence
Hence, its base = 10 its base = 2
• The maximum value of a • The maximum value of
single digit is 9 (one less
than the value of the
a single digit is 1 (one
base) less than the value of
the base)
• Each position of a digit
represents a specific • Each position of a digit
power of the base (10) represents a specific
• We use this number power of the base (2)
system in our day-to-day
life
• This number system is
used in computers
Octal Number
Positional Hexa Decimal
Number SystemsNumber
System System
• A positional number • A positional number system
system • Has total 16 symbols or
digits (0, 1, 2, 3, 4, 5, 6, 7,8,
• Has total 8 symbols or
9, A, B, C, D, E, F). Hence
digits (0, 1, 2, 3, 4, 5, its base = 16
6, 7).
• The symbols A, B, C, D, E
• Hence, its base = 8 and F represent the decimal
values 10, 11, 12, 13, 14
• The maximum value of and 15 respectively
a single digit is 7 (one
less than the value of • The maximum value of a
single digit is 15 (one less
the base than the value of the base)
• Each position of a • Each position of a digit
digit represents a represents a specific power
specific power of the of the base (16)
base (8) • Since there are only 16
• Since there are only 8 digits, 4 bits (24 = 16) are
Octal to Binary Table:
Binary to Hexa Decimal Table:
Decimal Number System
3.6 Hexa-Decimal to
Octal
Number system Conversions:
• There are many methods or techniques which can be
used to convert numbers from one base to another.
• We'll demonstrate here the following:
1. Decimal to Other Base System
2. Other Base System to Decimal
3. Other Base System to Non-Decimal
i. Shortcut method - Binary to Octal
ii. Shortcut method - Octal to Binary
iii. Shortcut method - Binary to Hexadecimal
iv. Shortcut method - Hexadecimal to Binary
v. Octal to Hexa decimal
vi. Hexa Decimal to Octal
Number
Decimal systemOther
to other Conversions:
base to
Base Decimal
Repeated Division Method by Repeated Multiplication
the required(Output)Base Method by the
(LCM) Method given(Input)Base
1. Other Base to
Decimal
1. Other Base to Decimal
Decimal Number
System
1.1 Binary System to Decimal
1.1 Binary System to Decimal
1.2 Octal To Decimal
1.2 Octal to Decimal
1.2 Octal to Decimal
1.2 Octal to Decimal
1.2 Octal To Decimal
1.3 HexaDecimal System To
Decimal System
1.3 HexaDecimal System To
Decimal System
1.3 HexaDecimal System To
Decimal System
1.3 HexaDecimal System To
Decimal System
2. Decimal to Other
Base
2 .1 D e c im a lto B in a r y