SlideShare a Scribd company logo
1 of 23
Download to read offline
1
SWETA KUMARI BARNWAL
NUMBER SYSTEM
The language we use to communicate with each other is comprised of words and characters.
We understand numbers, characters and words. But this type of data is not suitable for
computers. Computers only understand the numbers.
So, when we enter data, the data is converted into electronic pulse. Each pulse is identified as
code and the code is converted into numeric format by ASCII. It gives each number, character
and symbol a numeric value (number) that a computer understands. So, to understand the
language of computers, one must be familiar with the number systems.
The Number Systems used in computers are:
o Binary number system
o Octal number system
o Decimal number system
o Hexadecimal number system
BASE/RADIX: The base value in a numbering system.
For example,
β€’ In the decimal numbering system, the radix is 10.
β€’ In the hexadecimal numbering system, the radix is 16.
β€’ In the octal numbering system, the radix is 8.
β€’ In the binary numbering system, the radix is 2.
Decimal (10 Symbols)
(0, 1, 2, 3…9)
Octal (8 )
(0, 1, 2, 3…7)
HexaDecimal (16 Symbols)
(0, 1, 2, 3…9, A,B,C,D,E,F)
Binary (2 Symbols)
(0 & 1)
Number System
2
SWETA KUMARI BARNWAL
Bits & Bytes:
β€’ a "bit" is atomic: the smallest unit of storage
β€’ A bit store just a 0 or 1
β€’ "In the computer it's all 0's and 1's" ... bits
β€’ Anything with two separate states can store 1 bit
β€’ In a chip: electric charge = 0/1
β€’ In a hard drive: spots of North/South magnetism = 0/1
β€’ A bit is too small to be much use
β€’ Group of 8 bits together to make 1 byte
β€’ Everything in a computer is 0's and 1's. The bit stores just a 0 or 1: it's the smallest
building block of storage.
ASCII (American Standard Code for Information Interchange)
β€’ ASCII is an encoding representing each typed character by a number
β€’ Each number is stored in one byte (so the number is in 0 to 255)
β€’ A is 65
β€’ B is 66
β€’ a is 96
β€’ space is 32
ASCII stands for the "American Standard Code for Information Interchange".
It was designed in the early 60's, as a standard character set for computers and electronic
devices.
ASCII is a 7-bit character set containing 128 characters.
It contains the numbers from 0-9, the upper- and lower-case English letters from A to Z, and
some special characters.
The character sets used in modern computers, in HTML, and on the Internet, are all based on
ASCII.
The following tables list the 128 ASCII characters and their equivalent number.
3
SWETA KUMARI BARNWAL
4
SWETA KUMARI BARNWAL
Decimal to Binary
(951.205)10 β†’
(951.205)10 β†’ (1110110111.0011)2
Binary to Decimal
(110101.110)2 β†’ ( )10
5
SWETA KUMARI BARNWAL
(110101.110)2 β†’ (53.75)10
Decimal to Octal
(98.56)10 β†’ (142.4365)8
Octal to Decimal
(41.56)8 β†’ ( 33.7187)10
6
SWETA KUMARI BARNWAL
Decimal to Hexadecimal
(935.126)10 β†’ (3A7.204F)16
Hexadecimal to Decimal
(3A7.204F)16 β†’ (935.1261)10
(2) (1) (0) (-1) (-2) (-3) (-4) οƒŸ Position
3 A 7 . 2 0 4 F
x x x x x x x
162 161 160 16-1 16-2 16-3 16-4
768 + 160 + 7 . (.125) + (0) + (0.0009)+(0.0002)
7
SWETA KUMARI BARNWAL
Binary to/from Octal
a) Binary β†’ Decimal β†’ Octal
(1010101)2 β†’ (85)10 β†’ (125)8
(110011.110) β†’ (51.75) β†’ (63.6)
b) Octal β†’ Decimal β†’ Binary
(125) β†’ (85) β†’ (1010101) (1010101)
(721.25) β†’ (465.3281) β†’ (111010001.0101)
If no of bits = n
Number represented by that bits (N) = 2n
– 1
Ex:
Octal System (8 symbols: 0 to 7)
N = 7
N = 2n
– 1 = 7
n = 3
When we will convert Octal to Binary, we have required 3 bits for 1
digit.
Decimal to Binary
Binary to Decimal
2(n-1)
……… 22
21
20
32 16 8 4 2 1
No ABC
οƒŸ
4 2 1
0 0 0 0
8
SWETA KUMARI BARNWAL
1 0 0 1
2 0 1 0
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1
(125)8 = (001 010 101) (1010101)
721.25 β†’ (111 010 001. 010 101)
(110 011 . 110) β†’ 63.6
(001 110 010 101 . 110 100)2 β†’ (1625.64)
(56.54) β†’ (000056.540000) (5600.00054)
Exercise: Octal to Binary
(128.777)
(765.154)
(5564.721)
(254.631)
(435.61)
Exercise: Binary to Octal
(110111011.111101)
(101110100.011101)
(11100011.010101)
(1010101010.1101001)
9
SWETA KUMARI BARNWAL
Hexadecimal to/from Binary
a) Hexadecimal β†’ Decimal β†’ Binary
(A5.9D) β†’ (165.6132) β†’ (10100101.1001)
(FB1.C4) β†’ (4017.7656) β†’ (111110110001.1100)
b) Binary β†’ Decimal β†’ Hexadecimal
(11110011010.10110) β†’ (1946.6875) β†’ (79A.B0)
Hexadecimal System (16 symbols: 0 to 9 & A B C D E F)
N = 15
N = 2n
– 1 = 15
n = 4
When we will convert Octal to Binary, we have required 3 bits for 1
digit.
Decimal to Binary
Binary to Decimal
2(n-1)
……… 22
21
20
32 16 8 4 2 1
10
SWETA KUMARI BARNWAL
No ABCD
οƒŸ
8 4 2 1
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
A 1 0 1 0
B 1 0 1 1
C 1 1 0 0
D 1 1 0 1
E 1 1 1 0
F 1 1 1 1
a) Hexadecimal β†’ Binary
(A5.9D) β†’ (1010 0101 . 1001 1101) β†’ (1010 0101.1001)
(FB1.C4) β†’ (1111 1011 0001 . 1100 0100) β†’ (1111 1011 0001.1100)
(1FB1.C4) β†’ (0001 1111 1011 0001 . 1100 0100)
b) Binary β†’ Hexadecimal
(0111 1001 1010 . 1011 0) β†’ (79A.B0) β†’ (79A.B0)
Q. How many bits are required to represent a number system having 128
symbols? (N 0 to 127)
N = 127
N = 2n
-1
n = 7
11
SWETA KUMARI BARNWAL
Q. How many bits are required to represent a number system having 156
symbols?
N = 155
2n
-1 > = N
n >= 7
n = 8
Q. How many bits are required to represent a number system having 394
symbols?
2n
-1 > = N = 394
Let n = 8, condition is not true
Let n = 9, condition is true
n = 9
Ans.: 9
Q. How many symbols can be represented by using 10 bits?
Ans.: 1024
Q. Find the Maximum Number that can be represented by using 10 bits?
Ans.: 1023
Q. How many symbols can be represented by using 12 bits?
Ans.: 4096
Q. Find the Maximum Number that can be represented by using 9 bits?
Ans.: 511
Q. Hexadecimal to Binary
(BC5.982)
(A712.0056)
(5D8.234)
(98FE.BAF)
12
SWETA KUMARI BARNWAL
Exercise: Binary to Hexadecimal
(110111011.111101)
(101110100.011101)
(11100011.010101)
(1010101010.1101001)
We have already Covered:
Number System & Conversion between
a) Decimal to/from (Binary, Octal & Hexadecimal)
b) Binary to/from Octal & Hexadecimal
OCTAL TO/FROM HEXADECIMAL
Octal β†’ Binary β†’ Hexadecimal
(27.65)8 β†’ (00010 111 . 110 10100) β†’ (17.D4)16
(7765.6271)8 β†’ (111 111 110 101 . 110 010 111 001) β†’ (F F 5. C B 9)
B (11) (8421) (1011)
Hexadecimal β†’ Binary β†’ Octal
(FD90.5C7) β†’ (001111 1101 1001 0000 . 0101 1100 0111) β†’ (176620.2707)8
Ex:
(12FD.97C) (9532.4471) (10DE4.10B) (7AB.F9EB)
(710.554) (5517.346) (7712.354) (1275.2606)
BCD (Binary Coded Decimal)
Another process for converting decimal numbers into their binary equivalents.
β€’ It is a form of binary encoding where each digit in a decimal number is represented
in the form of bits.
β€’ This encoding can be done in either 4-bit or 8-bit (usually 4-bit is preferred).
13
SWETA KUMARI BARNWAL
β€’ It is a fast and efficient system that converts the decimal numbers into binary
numbers as compared to the existing binary system.
β€’ These are generally used in digital displays where is the manipulation of data is
quite a task.
β€’ Thus, BCD plays an important role here because the manipulation is done treating
each digit as a separate single sub-circuit.
In the BCD numbering system, the given decimal number is segregated into chunks of four
bits for each decimal digit within the number. Each decimal digit is converted into its direct
binary form (usually represented in 4-bits).
DECIMAL NUMBER BCD
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
(852.371)10 β†’ (1000 0101 0010 . 0011 0111 0001)BCD
8 β†’ 1000
5 β†’ 0101
2 β†’ 0010
3 β†’ 0011
7 β†’ 0111
1 β†’ 0001
14
SWETA KUMARI BARNWAL
Arithmetic System
a) Addition
1+0 = 1
0+0 = 0
1+1 = 10 β†’ {(1*21
) + (0*20
) = 2}
1+1+1 = 11 β†’ {(1*21
) + (1*20
) = 3}
1+1+1+1 = 100 β†’ {(1*22
) + (0*21
) + (0*20
) = 4}
1100
+1011
10111
11111
+11111
111110
12
12
24
99
99
198
15
SWETA KUMARI BARNWAL
Ex:
1011+1111+1100+1001
1111+1111+1111+1111 = 111100
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
95
98
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1100+0011
10101111+10001111 = 111111110, 100111110
10101111
10001111
11000011 + 1111100
8 4 2 1
0 1 0β†’ 2, 011/11 β†’ 3, 100
16
SWETA KUMARI BARNWAL
1+ 1 = 2, 1+1+1 = 3, 1+1+1+1=4
1+1 = 10, 1+1+1 = 11, 1+1+1+1=100
Ex:
a) 1011101110 +1111000110
b) 1111100001+11000110010+10001110101+1011011111=
1000101100111
01111100001
11000110010
10001110101
01011011111
b) Subtraction: (9-5 = 4, 5-9 = -4)
A B Difference Borrow
0 0 0 0
0 1
1 0 1 0
1 1 0 0
4
+5
9
-5
4
1+1 = 10 -1= 1
1+1=2-1=1
1+1=10-1= 1
17
SWETA KUMARI BARNWAL
10
-1
1 1 1 1
1 0 0 1
5000
1925
100 β†’ 4
2n-1
………..21
, 20
11111111100000 β†’ 16352
10000111000011 β†’ 08643
07709
(213
*0)+ (212
*1)+ (211
*1)+ (210
*1)+ (29
*1)+ (28
*0)+
(27
*0)+ (26
*0)+ (25
*0)+ (24
*1)+ (23
*1)+ (22
*1)+
(21
*0)+ (20
*1) =
0+4096+2048+1024+512+0+0+0+16+8+4+0+1=7709
Ex:
a) 110011101 – 100101011
b) 101010101-010101010
c) 111111000-111000111
18
SWETA KUMARI BARNWAL
d) 11001100-10101011
c) Multiplication:
1001
1000
1111
1111 11000001 (11100001)
Ex:
i) 11010*11100
ii) 11101*11111
iii) 111111*101010
iv) 101010*1010101
v) 111111*101
d) Division:
1001/1000
1000
19
SWETA KUMARI BARNWAL
Ex:
i) 11111/1100
ii) 101010/111
iii) 1110011/1010
iv) 1111010/1100
1876β†’ 10
762 β†’ 8
1011 β†’ 2
98A→ 16
1’s Complement:- A binary no system used to write the -ve no.
Method to write this no.-
transforming the 0 bit to 1 and the 1 bit to 0
Ex:-
1010111110 β†’ 0101000001 = 1111111111
9 β†’ 1001
(-9) β†’ 0110 (in 1’s complement)
129 β†’ 10000001 (2048 1024 512 256 128 64 32 16 8 4 2 1)
Write (-129) β†’ using 1’s complement β†’ 01111110
Write 148 in 1’s complement β†’ (10010100) β†’ 01101011 (-148)
20
SWETA KUMARI BARNWAL
NOTE: If we take complement of any no in two times, then we will get the
original no.
Write in 1’s Complement: (HW)
a) 1110001010 β†’ 0001110101
b) 11111000011
c) 10101010101
d) 1001111000
e) 256 β†’ 011111111 β†’ (100000000)
f) -412 β†’ (412β†’110011100) β†’ (-412 β†’ 001100011)
g) 98
h) -567
2’s Complement
101010111 β†’ (1’s Complement) 010101000 +1 β†’(2’s Complement)
010101001
010101001 β†’ 101010110+1 β†’ 101010111
10110110 β†’ 01001001 β†’ 10110110
256 β†’ (100000000) (Binary)
-256 β†’ (011111111) (in 1’s Complement)
-256 β†’ (011111111+1 β†’ 100000000) (in 2’s Complement)
011111111
1
-412 (412β†’110011100 β†’ Binary) β†’ (-412 β†’ 001100011 β†’ 1’s Complement)
β†’ (-412 β†’ 001100100 β†’ 2’s complement)
001100100 β†’ 110011011+1 β†’ 110011100
21
SWETA KUMARI BARNWAL
Ex:
a) 298 β†’ 100101010 β†’ (-298 β†’ 011010101 β†’ 1’s) (-298 β†’
011010110 β†’ 2’s)
b) -298 β†’ 011010110 (011011000)
c) 97
d) -492
e) 187
f) -299
g) 100011101
h) 111001111
i) 100000010
Sign Representation
-355 β†’ (355)
+355 β†’ (355)
(28 β†’ 000011100)
(-28 β†’ 100011100)
28 0
Sign
00011100
(Magnitude
-28 1
Sign
00011100
(Magnitude
(No. of bits: 1, 2, 4, 8, 16…….)
5 (+5) β†’ 0101 β†’ 0 0101
-5 β†’ 0101 (5) β†’ 1 0101
37 β†’ 00100101 (2n
no of bits) 32 16 8 4 2 1
22
SWETA KUMARI BARNWAL
54 β†’ 110110 (00110110) (1101 0110)
129 β†’ 10000001
37 β†’
0 00100101 000100101
-37 β†’
1 00100101 100100101
453 β†’ 111000101 β†’ 0000000111000101
0 0000000111000101 00000000111000101
-453
1 0000000111000101 10000000111000101
Ex: (HW)
Write these numbers in 1’s, 2’s Compliment & Sign Representation
a) 137 & -137
b) 98 & -98
c) 266 & -266
d) 32 & -32
e) 78 & -78
The given binary no is in sign representation. Find the magnitude & Sign.
a) 1 1001 = (-9)
23
SWETA KUMARI BARNWAL
b) 0 1101 (+13)
c) 0 00111010 (+58)
d) 1 00111111 (-63)
e) 1 11111111 (-255)
The given binary no (10010) is in sign representation. Find the magnitude
& Sign.
Ans: (-2)
Overflow:
1111
+1111
11110
10111
0111
11110
2n
β†’ No of symbols
2n
-1 β†’ Maximum no represented by n bits.
n β†’ bits number
n = 1
No of symbols = 21
= 2 ( 0, 1)
Maximum no represented by 1 bits = 21
-1 = 1
n = 2
No of symbols = 22
= 4 ( 00, 01,10, 11)
Maximum no represented by 2 bits = 22
-1 = 3
n = 5
No of symbols = 25
= 32 ( 00000, 00001, 00010……… 11111)
Maximum no represented by 5 bits = 25
-1 = 31

More Related Content

What's hot

Operating System.pdf
Operating System.pdfOperating System.pdf
Operating System.pdfSyed Zaid Irshad
Β 
chapter 1 introduction to operating system
chapter 1 introduction to operating systemchapter 1 introduction to operating system
chapter 1 introduction to operating systemAisyah Rafiuddin
Β 
Computer performance
Computer performanceComputer performance
Computer performanceAmit Kumar Rathi
Β 
Microprocessor - A Brief History
Microprocessor - A Brief HistoryMicroprocessor - A Brief History
Microprocessor - A Brief HistoryKamran Gillani
Β 
Coa module1
Coa module1Coa module1
Coa module1cs19club
Β 
Linux Interrupts
Linux InterruptsLinux Interrupts
Linux InterruptsKernel TLV
Β 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsDrishti Bhalla
Β 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory ManagementNi Zo-Ma
Β 
Boot process
Boot processBoot process
Boot processSalman Memon
Β 
Operating system components
Operating system componentsOperating system components
Operating system componentsSyed Zaid Irshad
Β 
Evolution of microprocessors
Evolution of microprocessorsEvolution of microprocessors
Evolution of microprocessorsAnas Abrar
Β 
Operating system
Operating systemOperating system
Operating systemSaransh Arora
Β 
How Operating system works.
How Operating system works. How Operating system works.
How Operating system works. Fahad Farooq
Β 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
Β 
Von-Neumann machine and IAS architecture
Von-Neumann machine and  IAS architectureVon-Neumann machine and  IAS architecture
Von-Neumann machine and IAS architectureShishir Aryal
Β 
History Of Microprocessors
History Of Microprocessors History Of Microprocessors
History Of Microprocessors Abdullah Tariq
Β 

What's hot (20)

Operating System.pdf
Operating System.pdfOperating System.pdf
Operating System.pdf
Β 
chapter 1 introduction to operating system
chapter 1 introduction to operating systemchapter 1 introduction to operating system
chapter 1 introduction to operating system
Β 
Computer performance
Computer performanceComputer performance
Computer performance
Β 
Microprocessor - A Brief History
Microprocessor - A Brief HistoryMicroprocessor - A Brief History
Microprocessor - A Brief History
Β 
Coa module1
Coa module1Coa module1
Coa module1
Β 
Linux Interrupts
Linux InterruptsLinux Interrupts
Linux Interrupts
Β 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating Systems
Β 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
Β 
Boot process
Boot processBoot process
Boot process
Β 
Operating system components
Operating system componentsOperating system components
Operating system components
Β 
Evolution of microprocessors
Evolution of microprocessorsEvolution of microprocessors
Evolution of microprocessors
Β 
Operating system
Operating systemOperating system
Operating system
Β 
How Operating system works.
How Operating system works. How Operating system works.
How Operating system works.
Β 
Linux architecture
Linux architectureLinux architecture
Linux architecture
Β 
Von-Neumann machine and IAS architecture
Von-Neumann machine and  IAS architectureVon-Neumann machine and  IAS architecture
Von-Neumann machine and IAS architecture
Β 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
Β 
History Of Microprocessors
History Of Microprocessors History Of Microprocessors
History Of Microprocessors
Β 
Bios vs uefi
Bios vs uefiBios vs uefi
Bios vs uefi
Β 
Pentium
PentiumPentium
Pentium
Β 
Bios
BiosBios
Bios
Β 

Similar to Number System.pdf

Chapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.pptChapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.pptKalGetachew2
Β 
08. Numeral Systems
08. Numeral Systems08. Numeral Systems
08. Numeral SystemsIntro C# Book
Β 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptxGobinathAECEJRF1101
Β 
COMPUTER AWARENESS.pptx
COMPUTER AWARENESS.pptxCOMPUTER AWARENESS.pptx
COMPUTER AWARENESS.pptxAbhishek Sonker
Β 
1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEMBuxoo Abdullah
Β 
digitalelectronics.ppt
digitalelectronics.pptdigitalelectronics.ppt
digitalelectronics.pptHarshalVaidya11
Β 
08 Numeral systems
08 Numeral systems08 Numeral systems
08 Numeral systemsmaznabili
Β 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).pptnivedita murugan
Β 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02sohag sikder
Β 
ADE UNIT-III (Digital Fundamentals).pptx
ADE UNIT-III (Digital Fundamentals).pptxADE UNIT-III (Digital Fundamentals).pptx
ADE UNIT-III (Digital Fundamentals).pptxKUMARS641064
Β 
004 NUMBER SYSTEM (1).pdf
004 NUMBER SYSTEM (1).pdf004 NUMBER SYSTEM (1).pdf
004 NUMBER SYSTEM (1).pdfMaheShiva
Β 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf4NM21IS132SAISHARATH
Β 
Digital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfDigital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfKannan Kanagaraj
Β 
number system
number systemnumber system
number systemPawan Mishra
Β 

Similar to Number System.pdf (20)

Lec 02
Lec 02Lec 02
Lec 02
Β 
Chapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.pptChapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.ppt
Β 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
Β 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
Β 
08. Numeral Systems
08. Numeral Systems08. Numeral Systems
08. Numeral Systems
Β 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx
Β 
COMPUTER AWARENESS.pptx
COMPUTER AWARENESS.pptxCOMPUTER AWARENESS.pptx
COMPUTER AWARENESS.pptx
Β 
1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM
Β 
digitalelectronics.ppt
digitalelectronics.pptdigitalelectronics.ppt
digitalelectronics.ppt
Β 
2013 1
2013 1 2013 1
2013 1
Β 
08 Numeral systems
08 Numeral systems08 Numeral systems
08 Numeral systems
Β 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
Β 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
Β 
ADE UNIT-III (Digital Fundamentals).pptx
ADE UNIT-III (Digital Fundamentals).pptxADE UNIT-III (Digital Fundamentals).pptx
ADE UNIT-III (Digital Fundamentals).pptx
Β 
004 NUMBER SYSTEM (1).pdf
004 NUMBER SYSTEM (1).pdf004 NUMBER SYSTEM (1).pdf
004 NUMBER SYSTEM (1).pdf
Β 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
Β 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
Β 
Digital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfDigital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdf
Β 
Number systems
Number systemsNumber systems
Number systems
Β 
number system
number systemnumber system
number system
Β 

More from Sweta Kumari Barnwal

MODULE-2-Cloud Computing.docx.pdf
MODULE-2-Cloud Computing.docx.pdfMODULE-2-Cloud Computing.docx.pdf
MODULE-2-Cloud Computing.docx.pdfSweta Kumari Barnwal
Β 
Cloud Computing_Module-1.pdf
Cloud Computing_Module-1.pdfCloud Computing_Module-1.pdf
Cloud Computing_Module-1.pdfSweta Kumari Barnwal
Β 
Computer Network-Data Link Layer-Module-2.pdf
Computer Network-Data Link Layer-Module-2.pdfComputer Network-Data Link Layer-Module-2.pdf
Computer Network-Data Link Layer-Module-2.pdfSweta Kumari Barnwal
Β 
Sensors in Different Applications Area.pdf
Sensors in Different Applications Area.pdfSensors in Different Applications Area.pdf
Sensors in Different Applications Area.pdfSweta Kumari Barnwal
Β 
Sensor technology module-3-interface electronic circuits
Sensor technology module-3-interface electronic circuitsSensor technology module-3-interface electronic circuits
Sensor technology module-3-interface electronic circuitsSweta Kumari Barnwal
Β 
Sensors fundamentals and characteristics, physical principle of sensing
Sensors fundamentals and characteristics, physical principle of sensingSensors fundamentals and characteristics, physical principle of sensing
Sensors fundamentals and characteristics, physical principle of sensingSweta Kumari Barnwal
Β 
Operating system and services
Operating system and servicesOperating system and services
Operating system and servicesSweta Kumari Barnwal
Β 
Network Layer & Transport Layer
Network Layer & Transport LayerNetwork Layer & Transport Layer
Network Layer & Transport LayerSweta Kumari Barnwal
Β 
Module 5-cloud computing-SECURITY IN THE CLOUD
Module 5-cloud computing-SECURITY IN THE CLOUDModule 5-cloud computing-SECURITY IN THE CLOUD
Module 5-cloud computing-SECURITY IN THE CLOUDSweta Kumari Barnwal
Β 
Unit ii-hackers and cyber crimes
Unit ii-hackers and cyber crimesUnit ii-hackers and cyber crimes
Unit ii-hackers and cyber crimesSweta Kumari Barnwal
Β 
Virtualization - cloud computing
Virtualization - cloud computingVirtualization - cloud computing
Virtualization - cloud computingSweta Kumari Barnwal
Β 
Process improvement & service oriented software engineering
Process improvement & service oriented software engineeringProcess improvement & service oriented software engineering
Process improvement & service oriented software engineeringSweta Kumari Barnwal
Β 

More from Sweta Kumari Barnwal (20)

UNIT-1 Start Learning R.pdf
UNIT-1 Start Learning R.pdfUNIT-1 Start Learning R.pdf
UNIT-1 Start Learning R.pdf
Β 
MODULE-2-Cloud Computing.docx.pdf
MODULE-2-Cloud Computing.docx.pdfMODULE-2-Cloud Computing.docx.pdf
MODULE-2-Cloud Computing.docx.pdf
Β 
Cloud Computing_Module-1.pdf
Cloud Computing_Module-1.pdfCloud Computing_Module-1.pdf
Cloud Computing_Module-1.pdf
Β 
Computer Network-Data Link Layer-Module-2.pdf
Computer Network-Data Link Layer-Module-2.pdfComputer Network-Data Link Layer-Module-2.pdf
Computer Network-Data Link Layer-Module-2.pdf
Β 
Sensors in Different Applications Area.pdf
Sensors in Different Applications Area.pdfSensors in Different Applications Area.pdf
Sensors in Different Applications Area.pdf
Β 
Sensor technology module-3-interface electronic circuits
Sensor technology module-3-interface electronic circuitsSensor technology module-3-interface electronic circuits
Sensor technology module-3-interface electronic circuits
Β 
Sensors fundamentals and characteristics, physical principle of sensing
Sensors fundamentals and characteristics, physical principle of sensingSensors fundamentals and characteristics, physical principle of sensing
Sensors fundamentals and characteristics, physical principle of sensing
Β 
Features of windows
Features of windowsFeatures of windows
Features of windows
Β 
Operating system and services
Operating system and servicesOperating system and services
Operating system and services
Β 
Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computers
Β 
Application Layer
Application LayerApplication Layer
Application Layer
Β 
Network Layer & Transport Layer
Network Layer & Transport LayerNetwork Layer & Transport Layer
Network Layer & Transport Layer
Β 
Module 5-cloud computing-SECURITY IN THE CLOUD
Module 5-cloud computing-SECURITY IN THE CLOUDModule 5-cloud computing-SECURITY IN THE CLOUD
Module 5-cloud computing-SECURITY IN THE CLOUD
Β 
Module 3-cyber security
Module 3-cyber securityModule 3-cyber security
Module 3-cyber security
Β 
Unit ii-hackers and cyber crimes
Unit ii-hackers and cyber crimesUnit ii-hackers and cyber crimes
Unit ii-hackers and cyber crimes
Β 
Module 3-cloud computing
Module 3-cloud computingModule 3-cloud computing
Module 3-cloud computing
Β 
Virtualization - cloud computing
Virtualization - cloud computingVirtualization - cloud computing
Virtualization - cloud computing
Β 
Process improvement & service oriented software engineering
Process improvement & service oriented software engineeringProcess improvement & service oriented software engineering
Process improvement & service oriented software engineering
Β 
Introduction to computers i
Introduction to computers iIntroduction to computers i
Introduction to computers i
Β 
file management
 file management file management
file management
Β 

Recently uploaded

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
Β 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
Β 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
Β 
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdfssuser54595a
Β 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
Β 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
Β 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
Β 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
Β 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
Β 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
Β 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
Β 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
Β 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
Β 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
Β 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
Β 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
Β 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
Β 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
Β 

Recently uploaded (20)

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
Β 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
Β 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
Β 
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Β 
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf
Β 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
Β 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
Β 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
Β 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
Β 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
Β 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
Β 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
Β 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
Β 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
Β 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Β 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
Β 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
Β 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
Β 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
Β 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
Β 

Number System.pdf

  • 1. 1 SWETA KUMARI BARNWAL NUMBER SYSTEM The language we use to communicate with each other is comprised of words and characters. We understand numbers, characters and words. But this type of data is not suitable for computers. Computers only understand the numbers. So, when we enter data, the data is converted into electronic pulse. Each pulse is identified as code and the code is converted into numeric format by ASCII. It gives each number, character and symbol a numeric value (number) that a computer understands. So, to understand the language of computers, one must be familiar with the number systems. The Number Systems used in computers are: o Binary number system o Octal number system o Decimal number system o Hexadecimal number system BASE/RADIX: The base value in a numbering system. For example, β€’ In the decimal numbering system, the radix is 10. β€’ In the hexadecimal numbering system, the radix is 16. β€’ In the octal numbering system, the radix is 8. β€’ In the binary numbering system, the radix is 2. Decimal (10 Symbols) (0, 1, 2, 3…9) Octal (8 ) (0, 1, 2, 3…7) HexaDecimal (16 Symbols) (0, 1, 2, 3…9, A,B,C,D,E,F) Binary (2 Symbols) (0 & 1) Number System
  • 2. 2 SWETA KUMARI BARNWAL Bits & Bytes: β€’ a "bit" is atomic: the smallest unit of storage β€’ A bit store just a 0 or 1 β€’ "In the computer it's all 0's and 1's" ... bits β€’ Anything with two separate states can store 1 bit β€’ In a chip: electric charge = 0/1 β€’ In a hard drive: spots of North/South magnetism = 0/1 β€’ A bit is too small to be much use β€’ Group of 8 bits together to make 1 byte β€’ Everything in a computer is 0's and 1's. The bit stores just a 0 or 1: it's the smallest building block of storage. ASCII (American Standard Code for Information Interchange) β€’ ASCII is an encoding representing each typed character by a number β€’ Each number is stored in one byte (so the number is in 0 to 255) β€’ A is 65 β€’ B is 66 β€’ a is 96 β€’ space is 32 ASCII stands for the "American Standard Code for Information Interchange". It was designed in the early 60's, as a standard character set for computers and electronic devices. ASCII is a 7-bit character set containing 128 characters. It contains the numbers from 0-9, the upper- and lower-case English letters from A to Z, and some special characters. The character sets used in modern computers, in HTML, and on the Internet, are all based on ASCII. The following tables list the 128 ASCII characters and their equivalent number.
  • 4. 4 SWETA KUMARI BARNWAL Decimal to Binary (951.205)10 β†’ (951.205)10 β†’ (1110110111.0011)2 Binary to Decimal (110101.110)2 β†’ ( )10
  • 5. 5 SWETA KUMARI BARNWAL (110101.110)2 β†’ (53.75)10 Decimal to Octal (98.56)10 β†’ (142.4365)8 Octal to Decimal (41.56)8 β†’ ( 33.7187)10
  • 6. 6 SWETA KUMARI BARNWAL Decimal to Hexadecimal (935.126)10 β†’ (3A7.204F)16 Hexadecimal to Decimal (3A7.204F)16 β†’ (935.1261)10 (2) (1) (0) (-1) (-2) (-3) (-4) οƒŸ Position 3 A 7 . 2 0 4 F x x x x x x x 162 161 160 16-1 16-2 16-3 16-4 768 + 160 + 7 . (.125) + (0) + (0.0009)+(0.0002)
  • 7. 7 SWETA KUMARI BARNWAL Binary to/from Octal a) Binary β†’ Decimal β†’ Octal (1010101)2 β†’ (85)10 β†’ (125)8 (110011.110) β†’ (51.75) β†’ (63.6) b) Octal β†’ Decimal β†’ Binary (125) β†’ (85) β†’ (1010101) (1010101) (721.25) β†’ (465.3281) β†’ (111010001.0101) If no of bits = n Number represented by that bits (N) = 2n – 1 Ex: Octal System (8 symbols: 0 to 7) N = 7 N = 2n – 1 = 7 n = 3 When we will convert Octal to Binary, we have required 3 bits for 1 digit. Decimal to Binary Binary to Decimal 2(n-1) ……… 22 21 20 32 16 8 4 2 1 No ABC οƒŸ 4 2 1 0 0 0 0
  • 8. 8 SWETA KUMARI BARNWAL 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 (125)8 = (001 010 101) (1010101) 721.25 β†’ (111 010 001. 010 101) (110 011 . 110) β†’ 63.6 (001 110 010 101 . 110 100)2 β†’ (1625.64) (56.54) β†’ (000056.540000) (5600.00054) Exercise: Octal to Binary (128.777) (765.154) (5564.721) (254.631) (435.61) Exercise: Binary to Octal (110111011.111101) (101110100.011101) (11100011.010101) (1010101010.1101001)
  • 9. 9 SWETA KUMARI BARNWAL Hexadecimal to/from Binary a) Hexadecimal β†’ Decimal β†’ Binary (A5.9D) β†’ (165.6132) β†’ (10100101.1001) (FB1.C4) β†’ (4017.7656) β†’ (111110110001.1100) b) Binary β†’ Decimal β†’ Hexadecimal (11110011010.10110) β†’ (1946.6875) β†’ (79A.B0) Hexadecimal System (16 symbols: 0 to 9 & A B C D E F) N = 15 N = 2n – 1 = 15 n = 4 When we will convert Octal to Binary, we have required 3 bits for 1 digit. Decimal to Binary Binary to Decimal 2(n-1) ……… 22 21 20 32 16 8 4 2 1
  • 10. 10 SWETA KUMARI BARNWAL No ABCD οƒŸ 8 4 2 1 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1 A 1 0 1 0 B 1 0 1 1 C 1 1 0 0 D 1 1 0 1 E 1 1 1 0 F 1 1 1 1 a) Hexadecimal β†’ Binary (A5.9D) β†’ (1010 0101 . 1001 1101) β†’ (1010 0101.1001) (FB1.C4) β†’ (1111 1011 0001 . 1100 0100) β†’ (1111 1011 0001.1100) (1FB1.C4) β†’ (0001 1111 1011 0001 . 1100 0100) b) Binary β†’ Hexadecimal (0111 1001 1010 . 1011 0) β†’ (79A.B0) β†’ (79A.B0) Q. How many bits are required to represent a number system having 128 symbols? (N 0 to 127) N = 127 N = 2n -1 n = 7
  • 11. 11 SWETA KUMARI BARNWAL Q. How many bits are required to represent a number system having 156 symbols? N = 155 2n -1 > = N n >= 7 n = 8 Q. How many bits are required to represent a number system having 394 symbols? 2n -1 > = N = 394 Let n = 8, condition is not true Let n = 9, condition is true n = 9 Ans.: 9 Q. How many symbols can be represented by using 10 bits? Ans.: 1024 Q. Find the Maximum Number that can be represented by using 10 bits? Ans.: 1023 Q. How many symbols can be represented by using 12 bits? Ans.: 4096 Q. Find the Maximum Number that can be represented by using 9 bits? Ans.: 511 Q. Hexadecimal to Binary (BC5.982) (A712.0056) (5D8.234) (98FE.BAF)
  • 12. 12 SWETA KUMARI BARNWAL Exercise: Binary to Hexadecimal (110111011.111101) (101110100.011101) (11100011.010101) (1010101010.1101001) We have already Covered: Number System & Conversion between a) Decimal to/from (Binary, Octal & Hexadecimal) b) Binary to/from Octal & Hexadecimal OCTAL TO/FROM HEXADECIMAL Octal β†’ Binary β†’ Hexadecimal (27.65)8 β†’ (00010 111 . 110 10100) β†’ (17.D4)16 (7765.6271)8 β†’ (111 111 110 101 . 110 010 111 001) β†’ (F F 5. C B 9) B (11) (8421) (1011) Hexadecimal β†’ Binary β†’ Octal (FD90.5C7) β†’ (001111 1101 1001 0000 . 0101 1100 0111) β†’ (176620.2707)8 Ex: (12FD.97C) (9532.4471) (10DE4.10B) (7AB.F9EB) (710.554) (5517.346) (7712.354) (1275.2606) BCD (Binary Coded Decimal) Another process for converting decimal numbers into their binary equivalents. β€’ It is a form of binary encoding where each digit in a decimal number is represented in the form of bits. β€’ This encoding can be done in either 4-bit or 8-bit (usually 4-bit is preferred).
  • 13. 13 SWETA KUMARI BARNWAL β€’ It is a fast and efficient system that converts the decimal numbers into binary numbers as compared to the existing binary system. β€’ These are generally used in digital displays where is the manipulation of data is quite a task. β€’ Thus, BCD plays an important role here because the manipulation is done treating each digit as a separate single sub-circuit. In the BCD numbering system, the given decimal number is segregated into chunks of four bits for each decimal digit within the number. Each decimal digit is converted into its direct binary form (usually represented in 4-bits). DECIMAL NUMBER BCD 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 (852.371)10 β†’ (1000 0101 0010 . 0011 0111 0001)BCD 8 β†’ 1000 5 β†’ 0101 2 β†’ 0010 3 β†’ 0011 7 β†’ 0111 1 β†’ 0001
  • 14. 14 SWETA KUMARI BARNWAL Arithmetic System a) Addition 1+0 = 1 0+0 = 0 1+1 = 10 β†’ {(1*21 ) + (0*20 ) = 2} 1+1+1 = 11 β†’ {(1*21 ) + (1*20 ) = 3} 1+1+1+1 = 100 β†’ {(1*22 ) + (0*21 ) + (0*20 ) = 4} 1100 +1011 10111 11111 +11111 111110 12 12 24 99 99 198
  • 15. 15 SWETA KUMARI BARNWAL Ex: 1011+1111+1100+1001 1111+1111+1111+1111 = 111100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 95 98 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1100+0011 10101111+10001111 = 111111110, 100111110 10101111 10001111 11000011 + 1111100 8 4 2 1 0 1 0β†’ 2, 011/11 β†’ 3, 100
  • 16. 16 SWETA KUMARI BARNWAL 1+ 1 = 2, 1+1+1 = 3, 1+1+1+1=4 1+1 = 10, 1+1+1 = 11, 1+1+1+1=100 Ex: a) 1011101110 +1111000110 b) 1111100001+11000110010+10001110101+1011011111= 1000101100111 01111100001 11000110010 10001110101 01011011111 b) Subtraction: (9-5 = 4, 5-9 = -4) A B Difference Borrow 0 0 0 0 0 1 1 0 1 0 1 1 0 0 4 +5 9 -5 4 1+1 = 10 -1= 1 1+1=2-1=1 1+1=10-1= 1
  • 17. 17 SWETA KUMARI BARNWAL 10 -1 1 1 1 1 1 0 0 1 5000 1925 100 β†’ 4 2n-1 ………..21 , 20 11111111100000 β†’ 16352 10000111000011 β†’ 08643 07709 (213 *0)+ (212 *1)+ (211 *1)+ (210 *1)+ (29 *1)+ (28 *0)+ (27 *0)+ (26 *0)+ (25 *0)+ (24 *1)+ (23 *1)+ (22 *1)+ (21 *0)+ (20 *1) = 0+4096+2048+1024+512+0+0+0+16+8+4+0+1=7709 Ex: a) 110011101 – 100101011 b) 101010101-010101010 c) 111111000-111000111
  • 18. 18 SWETA KUMARI BARNWAL d) 11001100-10101011 c) Multiplication: 1001 1000 1111 1111 11000001 (11100001) Ex: i) 11010*11100 ii) 11101*11111 iii) 111111*101010 iv) 101010*1010101 v) 111111*101 d) Division: 1001/1000 1000
  • 19. 19 SWETA KUMARI BARNWAL Ex: i) 11111/1100 ii) 101010/111 iii) 1110011/1010 iv) 1111010/1100 1876β†’ 10 762 β†’ 8 1011 β†’ 2 98Aβ†’ 16 1’s Complement:- A binary no system used to write the -ve no. Method to write this no.- transforming the 0 bit to 1 and the 1 bit to 0 Ex:- 1010111110 β†’ 0101000001 = 1111111111 9 β†’ 1001 (-9) β†’ 0110 (in 1’s complement) 129 β†’ 10000001 (2048 1024 512 256 128 64 32 16 8 4 2 1) Write (-129) β†’ using 1’s complement β†’ 01111110 Write 148 in 1’s complement β†’ (10010100) β†’ 01101011 (-148)
  • 20. 20 SWETA KUMARI BARNWAL NOTE: If we take complement of any no in two times, then we will get the original no. Write in 1’s Complement: (HW) a) 1110001010 β†’ 0001110101 b) 11111000011 c) 10101010101 d) 1001111000 e) 256 β†’ 011111111 β†’ (100000000) f) -412 β†’ (412β†’110011100) β†’ (-412 β†’ 001100011) g) 98 h) -567 2’s Complement 101010111 β†’ (1’s Complement) 010101000 +1 β†’(2’s Complement) 010101001 010101001 β†’ 101010110+1 β†’ 101010111 10110110 β†’ 01001001 β†’ 10110110 256 β†’ (100000000) (Binary) -256 β†’ (011111111) (in 1’s Complement) -256 β†’ (011111111+1 β†’ 100000000) (in 2’s Complement) 011111111 1 -412 (412β†’110011100 β†’ Binary) β†’ (-412 β†’ 001100011 β†’ 1’s Complement) β†’ (-412 β†’ 001100100 β†’ 2’s complement) 001100100 β†’ 110011011+1 β†’ 110011100
  • 21. 21 SWETA KUMARI BARNWAL Ex: a) 298 β†’ 100101010 β†’ (-298 β†’ 011010101 β†’ 1’s) (-298 β†’ 011010110 β†’ 2’s) b) -298 β†’ 011010110 (011011000) c) 97 d) -492 e) 187 f) -299 g) 100011101 h) 111001111 i) 100000010 Sign Representation -355 β†’ (355) +355 β†’ (355) (28 β†’ 000011100) (-28 β†’ 100011100) 28 0 Sign 00011100 (Magnitude -28 1 Sign 00011100 (Magnitude (No. of bits: 1, 2, 4, 8, 16…….) 5 (+5) β†’ 0101 β†’ 0 0101 -5 β†’ 0101 (5) β†’ 1 0101 37 β†’ 00100101 (2n no of bits) 32 16 8 4 2 1
  • 22. 22 SWETA KUMARI BARNWAL 54 β†’ 110110 (00110110) (1101 0110) 129 β†’ 10000001 37 β†’ 0 00100101 000100101 -37 β†’ 1 00100101 100100101 453 β†’ 111000101 β†’ 0000000111000101 0 0000000111000101 00000000111000101 -453 1 0000000111000101 10000000111000101 Ex: (HW) Write these numbers in 1’s, 2’s Compliment & Sign Representation a) 137 & -137 b) 98 & -98 c) 266 & -266 d) 32 & -32 e) 78 & -78 The given binary no is in sign representation. Find the magnitude & Sign. a) 1 1001 = (-9)
  • 23. 23 SWETA KUMARI BARNWAL b) 0 1101 (+13) c) 0 00111010 (+58) d) 1 00111111 (-63) e) 1 11111111 (-255) The given binary no (10010) is in sign representation. Find the magnitude & Sign. Ans: (-2) Overflow: 1111 +1111 11110 10111 0111 11110 2n β†’ No of symbols 2n -1 β†’ Maximum no represented by n bits. n β†’ bits number n = 1 No of symbols = 21 = 2 ( 0, 1) Maximum no represented by 1 bits = 21 -1 = 1 n = 2 No of symbols = 22 = 4 ( 00, 01,10, 11) Maximum no represented by 2 bits = 22 -1 = 3 n = 5 No of symbols = 25 = 32 ( 00000, 00001, 00010……… 11111) Maximum no represented by 5 bits = 25 -1 = 31