SlideShare a Scribd company logo
1 of 44
1
2
2
+1
=3
HOW THE COMPUTER GETS
THE ANSWER
3
A computer understands
information composed of only zeros and
ones.
The decimal number system is
convenient for the programmer.
The computer uses binary digits for its
operation.
0
1
0
1
1
0
1
1
0
0
1
0
BASIC
NUMBER
SYSTEM
DECIMAL
HEXA
DECIMAL
OCTAL
BINARY
4
DECIMAL NUMBER SYSTEM
5
• 0,1,2,3,4,5,6,7,8,9.DIGITS
• 10BASE
6
8*10
9*10
5*10
4*10
DECIMAL NUMBER 4598
0
1
2
3
7
BINARY NUMBER SYSTEM
•0,1DIGITS
•2BASE
8
BINARY NUMBER 1011
1*2
1*2
0*2
1*2
0
1
2
3
9
HEXADECIMAL NUMBER
SYSTEM
•0,1,2,3,4,5,6,7,
•8,9,A,B,C,D,E,F.
DIGITS
•16BASE
10
HEXADECIMAL NUMBER 1A5D
D*16
5*16
A*16
1*16
0
1
2
3
11
OCTAL NUMBER SYSTEM
•0,1,2,3,4,
•5,6,7,8.
DIGITS
•8BASE
12
OCTAL NUMBER 5273
3*8
7*8
2*8
5*8
0
1
2
3
13
CONVERSIONS IN BASIC
NUMBER SYSTEM
14
BINARY TO DECIMAL
• 1 0 1 0 1
BINARY
• 5 4 3 2 1
BIT
POSITION • 1*2 +0*2 +1*2
+0*2 +1*2.
MUL WITH
BASE
• 21
DECIMAL4 3 2
1 0
15
HEXADECIMAL TO DECIMAL
•5A9
HEX
•3 2 1
BIT POSITION
• 5*16
+A*16
+9*16
MUL WITH
BASE
•1449
DECIMAL2
1
0
16
OCTAL TO DECIMAL
•645
OCTAL
•3 2 1
BIT
POSITION
•6*8 +4*8
+5*8.
MUL WITH
BASE
•421
DECIMAL
2 1
0
17
DECIMAL TO BINARY
• Q=19
• R=139 • Q=9
• R=119 • Q=4
• R=19 • Q=2
• R=04 • Q=1
• R=02 • Q=0
• R=11
LSB MSB
Divide through out by 2
DECIMAL = 39
BINARY = 100111
18
DECIMAL TO HEX
• Q=2
• R=335 • Q=0
• R=22
Divide through out by 16
LSB MSB
DECIMAL = 35
HEX = 23
19
DECIMAL TO OCTAL
• Q=57
• R=5461
• Q=7
• R=157
• Q=0
• R=77
Divide through out by 8
LSB MSB
DECIMAL = 461
OCTAL = 715
20
BINARY TO HEXADECIMAL
BINARY
• (010111011001)
4BITS DIV
• (0101)(1101)(1001)
HEX
• (5) (D) (9) =(5D9)2 16
21
BINARY TO OCTAL
BINARY
• (101111100)
3BIT DIV
• (101)(111)(100)
OCTAL
• (5) (7) (4)
=(574)
2
8
22
HEXADECIMAL TO BINARY
HEX
• (5C)
EXPANSION
• (0101)(1100)
BINARY
• (01011100)16 2
23
OCTAL TO BINARY
OCTAL
• (436)
EXPANSION
• (100)(011)
BINARY
• (100011)
8 2
24
HEXADECIMAL TO OCTAL
• (4DF)HEX
• (0100)(1101)(1111)EXP
• (010011010000)BINARY
• (010)(011)(011)(111)3BIT DIV
• (2337)OCTAL
16
2
8
25
OCTAL TO HEXADECIMAL
• (456)OCTAL
• (100)(101)(110)EXP
• (100101110)BINARY
• (0001)(0010)(1110)4BIT DIV
• (12E)HEX
8
2
16
26
REPRESENTATION OF NEGATIVE
NUMBER
9’S & 10’S COMPLIMENT
• DECIMAL NUMBER SYSTEM
1’S & 2’S COMPLIMENT
• BINARY NUMBER SYSTEM
27
BINARY ARITHMETIC
1
• BINARY ADDITION
2
• BINARY SUBTRACTION
3
• BINARY MULTIPLICATION
4
• BINARY DIVISION
28
0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 0 1 (Carry bit)
BINARYADDITION
1 1 0 1 (13 decimal)
+0 0 0 1 (+1 decimal)
1 1 1 0 (14 decimal)
29
BINARY SUBTRACTION
0 ‐ 0 = 0
1 ‐ 0 = 1
0 ‐ 1 = 1 1 (Carry bit)
1 ‐ 1 = 0
1 1 0 1 (13 decimal)
+ 0 0 1 1 (-3 decimal)
1 0 1 0 (10 decimal)
Borrow
30
1 0 0 0 =810
X 0 1 1 0 =610
0 0 0 0
+ 1 0 0 0
+ 1 0 0 0
+ 0 0 0 0
0 1 1 0 0 0 0 = 4810
BINARY MULTIPLICATION
31
BINARY DIVISION
011 ) 0 1 1 0 0 1 0 ( 1
0 1 1
0 0 0 (0
0 0 0
0 0 0 (0
0 0 0
0 0 1 (0
0 0 0
0 1 0
Q=1000=1610
R=10= 210
32
SIGNED ARITHMETIC OPERATION
MSB bit is reserved to represent the sign of
the number.
When the number is negative, the sign bit is
kept one.
When the number is positive, the sign bit is 0.
In 8-bit processor, MSB = sign bit & other 7
bits = number.
In 16-bit processor, MSB = sign bit & other
15 bits = number.
33
EXAMPLES
0 0 0 0 0 1 0 1 (+5 decimal)
0 0 0 0 0 1 0 0 (+4 decimal)
0 0 0 0 1 0 0 1 (+9 decimal)
0 0 0 0 0 1 0 1 (+5 decimal)
1 0 0 0 0 0 1 0 (-2 decimal)
1 1 1 1 1 1 0 1 (1’comp of -2)
1 1 1 1 1 1 1 0 (2’s comp of -2)
0 0 0 0 0 0 1 1 (+3 decimal)
1
2
1 2 1
34
BCD AND GRAY CODE
35
LOGIC GATES
Logic gates perform basic logical functions.
They are fundamental building blocks of
digital integrated circuits.
Most logic gates take an input of two binary
values, and output a single value of a 1 or 0.
 Some circuits may have only a few logic
gates, while others, such as microprocessors,
may have millions of them.
There are seven different types of logic gates,
which are outlined.
36
37
38
39
40
41
42
43
FLIP-FLOPS
A flip-flop or latch is a circuit that has two
stable states and can be used to store state
information.
Each flip-flop stores one bit of information
44
THANK YOU

More Related Content

What's hot

Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsSARITHA REDDY
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adderGaditek
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Satya P. Joshi
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital ElectronicsJanki Shah
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits DrSonali Vyas
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller pptRahul Kumar
 
Ppt Digital Electronics
Ppt Digital ElectronicsPpt Digital Electronics
Ppt Digital ElectronicsNaval Kush
 
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to CountersISMT College
 
Multiplexer and DeMultiplexer
Multiplexer and DeMultiplexerMultiplexer and DeMultiplexer
Multiplexer and DeMultiplexerEstiak Khan
 
Registers and counters
Registers and counters Registers and counters
Registers and counters Deepak John
 
Parity Generator and Parity Checker
Parity Generator and Parity CheckerParity Generator and Parity Checker
Parity Generator and Parity CheckerJignesh Navdiya
 
basic logic gates
 basic logic gates basic logic gates
basic logic gatesvishal gupta
 
adder and subtractor
 adder and subtractor adder and subtractor
adder and subtractorUnsa Shakir
 
BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE Tamim Tanvir
 

What's hot (20)

flip flops
flip flops flip flops
flip flops
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
13 Boolean Algebra
13 Boolean Algebra13 Boolean Algebra
13 Boolean Algebra
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
Logic Gates
Logic GatesLogic Gates
Logic Gates
 
MULTIPLEXER
MULTIPLEXERMULTIPLEXER
MULTIPLEXER
 
Ppt Digital Electronics
Ppt Digital ElectronicsPpt Digital Electronics
Ppt Digital Electronics
 
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to Counters
 
Logic gates
Logic gatesLogic gates
Logic gates
 
8051 block diagram
8051 block diagram8051 block diagram
8051 block diagram
 
Multiplexer and DeMultiplexer
Multiplexer and DeMultiplexerMultiplexer and DeMultiplexer
Multiplexer and DeMultiplexer
 
Registers and counters
Registers and counters Registers and counters
Registers and counters
 
Parity Generator and Parity Checker
Parity Generator and Parity CheckerParity Generator and Parity Checker
Parity Generator and Parity Checker
 
basic logic gates
 basic logic gates basic logic gates
basic logic gates
 
adder and subtractor
 adder and subtractor adder and subtractor
adder and subtractor
 
BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE
 

Viewers also liked

Digital Electronic and it application
Digital Electronic and it applicationDigital Electronic and it application
Digital Electronic and it applicationApurbo Datta
 
Basics of Electronics
Basics of ElectronicsBasics of Electronics
Basics of ElectronicsVarun A M
 
Stuff harvesting - Gather your electronic components for hobbyist
Stuff harvesting - Gather your electronic components for hobbyistStuff harvesting - Gather your electronic components for hobbyist
Stuff harvesting - Gather your electronic components for hobbyistJoao Alves
 
Arduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch SlidesArduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch SlidesMithi Sevilla
 
Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1CAVC
 
Introduction to Basic Electronics
Introduction to Basic ElectronicsIntroduction to Basic Electronics
Introduction to Basic ElectronicsCiel Rampen
 
Basic electronics and electrical first year engineering
Basic electronics and electrical first year engineeringBasic electronics and electrical first year engineering
Basic electronics and electrical first year engineeringron181295
 
Electronic Components
Electronic ComponentsElectronic Components
Electronic Componentsdevikkang
 

Viewers also liked (10)

Digital Electronic and it application
Digital Electronic and it applicationDigital Electronic and it application
Digital Electronic and it application
 
Basics of Electronics
Basics of ElectronicsBasics of Electronics
Basics of Electronics
 
Stuff harvesting - Gather your electronic components for hobbyist
Stuff harvesting - Gather your electronic components for hobbyistStuff harvesting - Gather your electronic components for hobbyist
Stuff harvesting - Gather your electronic components for hobbyist
 
Arduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch SlidesArduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch Slides
 
Basic electronics
Basic electronicsBasic electronics
Basic electronics
 
Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1
 
Introduction to Basic Electronics
Introduction to Basic ElectronicsIntroduction to Basic Electronics
Introduction to Basic Electronics
 
Basic electronics and electrical first year engineering
Basic electronics and electrical first year engineeringBasic electronics and electrical first year engineering
Basic electronics and electrical first year engineering
 
Electronic Components
Electronic ComponentsElectronic Components
Electronic Components
 
Electronics ppt
Electronics ppt Electronics ppt
Electronics ppt
 

Similar to How Computers Perform Basic Math Using Binary Numbers

Similar to How Computers Perform Basic Math Using Binary Numbers (20)

Numbering Systems
Numbering SystemsNumbering Systems
Numbering Systems
 
03_NumberSystems.pdf
03_NumberSystems.pdf03_NumberSystems.pdf
03_NumberSystems.pdf
 
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
 
Understand data representation on CPU 1
Understand data representation on CPU 1Understand data representation on CPU 1
Understand data representation on CPU 1
 
DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
 
Kaizen cso002 l1
Kaizen cso002 l1Kaizen cso002 l1
Kaizen cso002 l1
 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
 
Dpsd lecture-notes
Dpsd lecture-notesDpsd lecture-notes
Dpsd lecture-notes
 
microprocessors
microprocessorsmicroprocessors
microprocessors
 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
Unit 1 PDF.pptx
Unit 1 PDF.pptxUnit 1 PDF.pptx
Unit 1 PDF.pptx
 
data representation
 data representation data representation
data representation
 
Binary codes
Binary codesBinary codes
Binary codes
 
dld 01-introduction
dld 01-introductiondld 01-introduction
dld 01-introduction
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptx
 
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
 
Digital Logic & Design
Digital Logic & DesignDigital Logic & Design
Digital Logic & Design
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
 

More from shalet kochumuttath Shaji (20)

Integrated circuits
Integrated circuitsIntegrated circuits
Integrated circuits
 
Measuring devices
Measuring devicesMeasuring devices
Measuring devices
 
Optical fibre
Optical fibreOptical fibre
Optical fibre
 
Robot applications
Robot applicationsRobot applications
Robot applications
 
Sensors
SensorsSensors
Sensors
 
Introduction to robotics
Introduction to roboticsIntroduction to robotics
Introduction to robotics
 
Op amps
Op ampsOp amps
Op amps
 
Nuclear i nstrumentation
Nuclear i nstrumentationNuclear i nstrumentation
Nuclear i nstrumentation
 
Gas chromatography
Gas chromatographyGas chromatography
Gas chromatography
 
Electronics basic concept
Electronics basic conceptElectronics basic concept
Electronics basic concept
 
Electronic passive components
Electronic passive componentsElectronic passive components
Electronic passive components
 
Diode applications
Diode applicationsDiode applications
Diode applications
 
Creativity
CreativityCreativity
Creativity
 
Communications
CommunicationsCommunications
Communications
 
Cellular communication
Cellular communicationCellular communication
Cellular communication
 
Evolution of electronics
Evolution of electronicsEvolution of electronics
Evolution of electronics
 
venturi meter
venturi meterventuri meter
venturi meter
 
fundamentals of machine vision system
fundamentals of machine vision systemfundamentals of machine vision system
fundamentals of machine vision system
 
vision system
vision systemvision system
vision system
 
SPATIAL FILTER
SPATIAL FILTERSPATIAL FILTER
SPATIAL FILTER
 

How Computers Perform Basic Math Using Binary Numbers