0% found this document useful (0 votes)
8 views55 pages

CH 07 Number System

Uploaded by

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

CH 07 Number System

Uploaded by

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

National University of Modern Languages

Department of Computer Science

Course: Applications of ICT


Program: BSCS 1st
Topic: 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

• The number system that we use in our daily life


is the Decimal Number System.
• In this system, the base is equal to 10 because
there are altogether ten digits i.e. 0, 1, 2, 3, 4,
5, 6, 7, 8, 9 used in this system.
• In Decimal Number System, the successive
positions to the left of the decimal point
represents Units, Tens, Hundreds and
Thousands etc.
• So each position represents a specific power of
the base 10 i.e. the Decimal
Binary System

• Characteristics of binary number system are as


follows:
1. Uses two digits, 0 and 1.
2. Also called base 2 number system
3. Each position in a binary number represents a 0
power of the base (2). Example 2 0
4. Last position in a binary number represents a x
power of the base (2). Example 2 x where x
represents the last position - 1.
Octal Number System

• Characteristics of octal number system are as


follows:
1. Uses eight digits, 0,1,2,3,4,5,6,7.
2. Also called base 8 number system
3. Each position in an octal number represents a
0 power of the base (8). Example 8 0
4. Last position in an octal number represents a x
power of the base (8). Example 8 x where x
represents the last position - 1.
Number system
Conversions
3. Other Base
System to Non-
1. Decimal to 2. Other Base Decimal
Other Base System to (Shortcut)
System Decimal
3.1 Binary to Octal

1.1 Decimal 2.1 Binary


to Binary to Decimal 3.2 Octal to Binary

1.2 Decimal 2.2 Octal to 3.3 Binary to Hexa-


to Octal Decimal Decimal

1.3 Decimal 2.3 Hexa- 3.4 Hexa-Decimal to


to Hexa- Decimal to Binary
Decimal Decimal
3.5 Octal to Hexa-
Decimal

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

• Decimal Number: 2910


• Calculating Binary Equivalent:
• Step Operation Result Remainder
2 .1 D e c im a lto B in a r y
2.2 Decimal to Octal
2.3 Decimal to HexaDecimal
3. Other Base to Non- Decimal
(Shortcuts)
3.1 Binary to Octal
Shortcut method
Binary to Octal
3.1 Binary to Octal (Decimal to
Binary )
3.1 Shortcut method
Binary to Octal
3.2 Octal to Binary
3.2 Octal to Binary
Shortcut Method Octal
to Binary
3.3 Binary to Hexa
Decimal
3.3 Binary to Hexa
Decimal
3.4 Hexa Decimal to
Binary
3.4 Hexa Decimal to
Binary
3.4 Hexa Decimal to
Binary
Shortcut Method Hexa Decimal to
Binary
3.5 Octal to Hexa
Decimal
3.5 Octal to Hexa
Decimal
3.6 Hexa Decimal to
Octal
3.6 Hexa Decimal to
Octal
Thanks

You might also like