SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Digital Electronics
Electronics Technology
Landon Johnson
Arithmetic Circuits
Arithmetic Competencies
18. Given an 8-bit binary signed number, state whether the number is
positive or negative with 100% accuracy.
19. Given an 8-bit binary number, state the 1’s compliment of that number
with 100% accuracy.
20. Given an 8-bit signed binary number, state the 2’s compliment of the
number with 100% accuracy.
21. Given 2 decimal numbers, use two’s complement and show the steps to solve
for the sum, and show the sum in binary and decimal with 100% accuracy.
22. Given 2 decimal numbers, use two’s complement and show the steps involved
to solve for the difference, and show the difference in binary and decimal with
100% accuracy.
37. Without reference the student will explain the difference between a half
adder and a full adder with 100% accuracy.
38. Without reference the student will draw a schematic showing how an
eight-bit adder can be made using two four bit adders with 100% accuracy.
Binary Addition
•In decimal, when we add two numbers and they
exceed the place value of a digit, we carry over.

1

9

10

+ 3 10
12 10
•The same thing works in binary

1

12

+ 12
10 2
Binary Addition
The four possible combinations of adding two binary
numbers can be stated as follows:

0
0

+
+

0
1

=
=

0
1

carry
carry

0
0

1

+

0

=

1

carry

0

1

+

1

=

0

carry

1
Binary Addition
A

B

SUM

CARRY

0

0

0

0

0

1

1

0

1

0

1

1

0

CARRY

0

1

SUM

1

A
B

HALF ADDER- used for LSB, adds two input numbers outputs sum and carry.
TEST
Perform the following decimal additions.
Convert the original decimal numbers to
binary and add them.
(A) 5 + 2
(B) 8 + 3
(C) 18 + 2
(D) 147 +75
(E) 31 + 7

We represent all binary
numbers in groups of 8
because it’s the standard for
most computers.
5
+ 2

0
+ 0

0
0

0
0

0
0

0
0

1
0

0
1

1
0

7

0

0

0

0

0

1

1

1

=

7

10
Two’s Complement Representation
The most widely used method of representing binary numbers
and performing arithmetic in computer systems.
Both positive and negative numbers can be represented in
the same format and binary subtraction is greatly
simplified.
Two’s complement uses the most significant bit (MSB) of the 8bit number to signify whether the number is positive or
negative.
The MSB called the sign bit and is defined as 0 for positive
numbers and 1 for negative numbers.

D7 D6 D5 D4 D3 D2 D1D0
SIGN BIT
Two’s Complement Representation
A table of two’s-complement numbers can be developed by
starting with some positive number and continuously subtracting
1
STEPS FOR
DECIMAL-TO-TWO’S-COMPLEMENT CONVERSION
1. If the decimal number is positive, the two’s-complement
number
is the true binary equivalent of the decimal number.
+18 = 0001 0010

2. If the decimal number is negative, the two’s-complement
number
is found by:
the

(a)

Complementing each bit of the true binary equivalent of
decimal number ( one’s complement ).

(b) Adding 1 to the one’s complement number to get the
magnitude bits. The sign bit will always be 1.
DECIMAL-TO-TWO’S-COMPLEMENT CONVERSION
EXAMPLE
Convert +35 to two’s complement
SOLUTION:
True Binary

= 0010 0011

Two’s complement = 0010 0011
DECIMAL-TO-TWO’S-COMPLEMENT CONVERSION
EXAMPLE
Convert -35 to two’s complement
SOLUTION:
True Binary

= 0010 0011

One’s complement = 1101 1100
Add 1
Two’s complement = 1101 1101

+1
STEPS FOR
TWO’S-COMPLEMENT-TO-DECIMAL CONVERSION
1. If the two’s-complement number is positive (SIGN BIT = 0), do
a
regular binary-to-decimal conversion.
2. If the two’s-complement number is negative (SIGN BIT = 1), the
decimal sign will be minus and the decimal number is found by:
bit.

(A)

Complementing the entire two’s complement number, bit by

(B)

Adding 1 to arrive at the true binary equivalent.

(C) Doing a regular binary-to-decimal conversion.
STEPS FOR
TWO’S-COMPLEMENT-TO-DECIMAL CONVERSION
EXAMPLE
Convert 1101 1101 two’s complement back to decimal.
SOLUTION: The sign bit is 1 so decimal result will be
negative.
Two’s complement = 1101 1101
Complement

= 0010 0010

Add 1
True binary

+1
= 0010 0011

Decimal equivalent = -35 Answer
Two’s Complement Arithmetic
•All basic arithmetic functions involving positive and negative
numbers can be dealt with simply by using 2’s complement.
•Subtraction is done by adding the 2’s complement
numbers.
•Adding in 2’s complement, do regular binary addition.
•Subtraction 2’s complement numbers, convert the number
to be subtracted to a negative 2’s complement number and
perform regular binary addition (5 - 3 = 5 + (-3). If the
result is negative, the sign bit will be a 1.
Two’s Complement Addition
EXAMPLE
Add 19 + 27 using 8-bit two’s complement
arithmetic
SOLUTION:
19 = 0001 0011
+ 27 = 0001 1011
Sum = 0010 1110 = 46 decimal
Two’s Complement Subtraction
EXAMPLE
Subtract 18 - 7 using 8-bit two’s complement arithmetic.
18 - 7 is the same as 18 + (-7), so add 18 plus negative 7.

SOLUTION:
Convert -7 to two’s complement
True Binary

+18 = 0001 0010

= 0000 0111

-7 = 1111 1000

One’s complement = 1111 1000
Add 1

+1

Sum = 0000 1011 = 11

Two’s complement = 1111 1001
Note: The carry-out of MSB is
ignored. It will always occur for
positive sums
PRACTICE
Covert the following decimal numbers to two’s
complement form and perform the operation indicated.
5

(a)

+

(e)

-

7

-

28

+

38

12

(b)

-

+

6

125

(f)

66

32

(c)

-

-

18

36

(g)

48

32

(d)

(h)

18

-

36
48
Binary Addition
A

B

SUM

CARRY

0

0

0

0

0

1

1

0

1

0

1

1

0

CARRY

0

1

SUM

1

A
B

HALF ADDER- used for LSB, adds two input numbers outputs sum and carry.
HALF ADDER
• Logic device that adds two binary numbers
• Only adds Least Significant Digit (LSD) column
(1s column) in binary addition
Input
Logic
Symbol:

Logic
Diagram:

A
B

Output
Half
Adder

Σ (sum)
C0 (carry out)
FULL ADDER
Used for adding binary place values other than the 1s place

Input
Logic
Symbol:

Logic
Diagram:

Cin
A
B

Output
Full
Adder

Σ (sum)
C0 (carry out)
FULL ADDER
FULL ADDER
A

B

C IN

SUM

0
0

0
0

0
1

0
1

C OUT
0
0

0
0

1
1

0
1

1
0

0
1

1
1

0

0
1

1

0

0

1

1
1

1

0
1

0
1

1
1

0
1

C OUT

A
B

C IN

SUM
PARALLEL ADDING
• Use half adder for LSD
• Use full adder for other digits
A2 A1 A0
+ B2 B1
B0
En
to

ter
be

bin
ad

ary

de

nu

PARALLEL ADDER
mb

d h
ere

ers

0 00 1 + 1 0 01
1
0
1 1 1 0 + 0 1 1 0

1 1 0 1 1
0 0 1 0 0
1 0 1 1

SUM appears here

Parallel adders are availablehalf-adderform.
in IC
1s place uses
2s, 4s, 8s places use full
adders
8-BIT ADDER
WHAT IS THIS ?
B

A

0

0

4321

4321

B4
B3
B2
B1

74LS83A
A4
A3
A2
A1
s4
B4
s3
B3
s2
B2
s1
B1
Cin

Cout

A
0
0
1
1

B
0
1
0
1

out
0
1
1
0
TEST
19. Given an 8-bit signed number state whether the number is
positive or negative.

1001 1111

negative

20. Given an 8-bit signed number state the one’s
complement of the number.

1001 1111
0110 0000
21. Given an 8-bit signed number state the two’s complement of
the number.

1001 1111
0110 0000
+1
0110 0001
TEST
22. Given two decimal numbers, use two’s complement form and
show the steps to solve for the sum, and show the sum in binary
and decimal.

100

0110 0100

26

0001 1010

+

0111 1110 = 126
23. Given two decimal numbers, use two’s complement form and
show the steps to solve for the difference, and show the
difference in binary and decimal.

-

78
32

0010 0000

0100 1110

1101 1111

1110 0000

+1
1110 0000

0010 1110 = 46

Weitere ähnliche Inhalte

Was ist angesagt?

Parity Generator and Parity Checker
Parity Generator and Parity CheckerParity Generator and Parity Checker
Parity Generator and Parity CheckerJignesh Navdiya
 
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)ISMT College
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator OverloadingNilesh Dalvi
 
carry look ahead adder
carry look ahead addercarry look ahead adder
carry look ahead adderASHISH MANI
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexersUnsa Shakir
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & DecoderSyed Saeed
 
DIGITAL ELECTRONICS- Logic Gates
DIGITAL ELECTRONICS- Logic GatesDIGITAL ELECTRONICS- Logic Gates
DIGITAL ELECTRONICS- Logic GatesTrinity Dwarka
 
Decoders
DecodersDecoders
DecodersRe Man
 
Half adder and full adder
Half adder and full adderHalf adder and full adder
Half adder and full adderSanjuktaBanik
 
Multiplexer and DeMultiplexer
Multiplexer and DeMultiplexerMultiplexer and DeMultiplexer
Multiplexer and DeMultiplexerEstiak Khan
 
Dlc{binary to gray code conversion} ppt
Dlc{binary to gray code conversion} pptDlc{binary to gray code conversion} ppt
Dlc{binary to gray code conversion} pptTanish Gupta
 

Was ist angesagt? (20)

Parallel Adder
Parallel Adder Parallel Adder
Parallel Adder
 
Parity Generator and Parity Checker
Parity Generator and Parity CheckerParity Generator and Parity Checker
Parity Generator and Parity Checker
 
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
 
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
 
Bcd
BcdBcd
Bcd
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
 
carry look ahead adder
carry look ahead addercarry look ahead adder
carry look ahead adder
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexers
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & Decoder
 
BCD Adder
BCD AdderBCD Adder
BCD Adder
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
DIGITAL ELECTRONICS- Logic Gates
DIGITAL ELECTRONICS- Logic GatesDIGITAL ELECTRONICS- Logic Gates
DIGITAL ELECTRONICS- Logic Gates
 
MULTIPLEXER
MULTIPLEXERMULTIPLEXER
MULTIPLEXER
 
Decoders
DecodersDecoders
Decoders
 
Half adder and full adder
Half adder and full adderHalf adder and full adder
Half adder and full adder
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
Multiplexer and DeMultiplexer
Multiplexer and DeMultiplexerMultiplexer and DeMultiplexer
Multiplexer and DeMultiplexer
 
Dlc{binary to gray code conversion} ppt
Dlc{binary to gray code conversion} pptDlc{binary to gray code conversion} ppt
Dlc{binary to gray code conversion} ppt
 
Code conversion
Code conversionCode conversion
Code conversion
 

Andere mochten auch

The Six Strands Of Diversity
The Six Strands Of DiversityThe Six Strands Of Diversity
The Six Strands Of DiversityWanda Goldwag
 
SYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSanjay Saluth
 
Telecommunication Network 1
Telecommunication Network 1Telecommunication Network 1
Telecommunication Network 1Sanjay Saluth
 
Software Engineering
Software EngineeringSoftware Engineering
Software EngineeringSanjay Saluth
 
Yamaha Manufacturing Plant
Yamaha Manufacturing PlantYamaha Manufacturing Plant
Yamaha Manufacturing PlantSanjay Saluth
 
Serial communication in 8085
Serial communication in 8085Serial communication in 8085
Serial communication in 8085Nitin Ahire
 
Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)Piyush Rochwani
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representationgavhays
 
Mettalurgy & heat treatment
Mettalurgy & heat treatmentMettalurgy & heat treatment
Mettalurgy & heat treatmentSanjay Saluth
 
Biometrics based key generation
Biometrics based key generationBiometrics based key generation
Biometrics based key generationPiyush Rochwani
 
2s complement arithmetic
2s complement arithmetic2s complement arithmetic
2s complement arithmeticSanjay Saluth
 
Arithmetic logic units
Arithmetic logic unitsArithmetic logic units
Arithmetic logic unitsowaisahmad125
 
problems of age Diversity in an organisation_how to avoid them
problems of age Diversity in an organisation_how to avoid themproblems of age Diversity in an organisation_how to avoid them
problems of age Diversity in an organisation_how to avoid themAnkush Sinha Ray
 
Arithmetic Logic Unit .
Arithmetic Logic Unit .Arithmetic Logic Unit .
Arithmetic Logic Unit .Deyaa Ahmed
 

Andere mochten auch (20)

The Six Strands Of Diversity
The Six Strands Of DiversityThe Six Strands Of Diversity
The Six Strands Of Diversity
 
SYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECT
 
Binary numbers-7-12-2011
Binary numbers-7-12-2011Binary numbers-7-12-2011
Binary numbers-7-12-2011
 
Unix Tutorial
Unix TutorialUnix Tutorial
Unix Tutorial
 
Telecommunication Network 1
Telecommunication Network 1Telecommunication Network 1
Telecommunication Network 1
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
Cisc(a022& a023)
Cisc(a022& a023)Cisc(a022& a023)
Cisc(a022& a023)
 
Alu1
Alu1Alu1
Alu1
 
Yamaha Manufacturing Plant
Yamaha Manufacturing PlantYamaha Manufacturing Plant
Yamaha Manufacturing Plant
 
Serial communication in 8085
Serial communication in 8085Serial communication in 8085
Serial communication in 8085
 
Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
 
Mettalurgy & heat treatment
Mettalurgy & heat treatmentMettalurgy & heat treatment
Mettalurgy & heat treatment
 
Biometrics based key generation
Biometrics based key generationBiometrics based key generation
Biometrics based key generation
 
Unit 3
Unit 3Unit 3
Unit 3
 
Unit 2
Unit 2Unit 2
Unit 2
 
2s complement arithmetic
2s complement arithmetic2s complement arithmetic
2s complement arithmetic
 
Arithmetic logic units
Arithmetic logic unitsArithmetic logic units
Arithmetic logic units
 
problems of age Diversity in an organisation_how to avoid them
problems of age Diversity in an organisation_how to avoid themproblems of age Diversity in an organisation_how to avoid them
problems of age Diversity in an organisation_how to avoid them
 
Arithmetic Logic Unit .
Arithmetic Logic Unit .Arithmetic Logic Unit .
Arithmetic Logic Unit .
 

Ähnlich wie Arithmetic circuits

CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfCDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfshubhangisonawane6
 
Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfTamiratDejene1
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.pptzorogoh2
 
index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...mayurjagdale4
 
Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...mayurjagdale4
 
Computer arithmetic operations.pptx
Computer arithmetic operations.pptxComputer arithmetic operations.pptx
Computer arithmetic operations.pptxssusera6fdd5
 
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsChapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsSSE_AndyLi
 
Unit 1 data representation and computer arithmetic
Unit 1  data representation and computer arithmeticUnit 1  data representation and computer arithmetic
Unit 1 data representation and computer arithmeticAmrutaMehata
 
W3 Chapter 2B Notes CCB1223 Digital Logic.pdf
W3 Chapter 2B Notes CCB1223 Digital Logic.pdfW3 Chapter 2B Notes CCB1223 Digital Logic.pdf
W3 Chapter 2B Notes CCB1223 Digital Logic.pdfMOHDZAMRIBINIBRAHIM1
 
Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001aarunachalamr16
 
module 1_class_numbers.pptx
module 1_class_numbers.pptxmodule 1_class_numbers.pptx
module 1_class_numbers.pptxssuser2efca7
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.pptRavikumarR77
 
Adder substracter
Adder substracterAdder substracter
Adder substracterWanNurdiana
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesDr. Anita Goel
 
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsFYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsArti Parab Academics
 
Integer represention
Integer representionInteger represention
Integer representionSaif Ullah
 

Ähnlich wie Arithmetic circuits (20)

CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfCDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
 
Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdf
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...
 
Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...
 
Computer arithmetic operations.pptx
Computer arithmetic operations.pptxComputer arithmetic operations.pptx
Computer arithmetic operations.pptx
 
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsChapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
 
Unit 1 data representation and computer arithmetic
Unit 1  data representation and computer arithmeticUnit 1  data representation and computer arithmetic
Unit 1 data representation and computer arithmetic
 
W3 Chapter 2B Notes CCB1223 Digital Logic.pdf
W3 Chapter 2B Notes CCB1223 Digital Logic.pdfW3 Chapter 2B Notes CCB1223 Digital Logic.pdf
W3 Chapter 2B Notes CCB1223 Digital Logic.pdf
 
computer arithmatic
computer arithmaticcomputer arithmatic
computer arithmatic
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001a
 
module 1_class_numbers.pptx
module 1_class_numbers.pptxmodule 1_class_numbers.pptx
module 1_class_numbers.pptx
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
 
Adder substracter
Adder substracterAdder substracter
Adder substracter
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemes
 
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsFYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
 
Integer represention
Integer representionInteger represention
Integer represention
 

Kürzlich hochgeladen

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Arithmetic circuits

  • 2. Arithmetic Competencies 18. Given an 8-bit binary signed number, state whether the number is positive or negative with 100% accuracy. 19. Given an 8-bit binary number, state the 1’s compliment of that number with 100% accuracy. 20. Given an 8-bit signed binary number, state the 2’s compliment of the number with 100% accuracy. 21. Given 2 decimal numbers, use two’s complement and show the steps to solve for the sum, and show the sum in binary and decimal with 100% accuracy. 22. Given 2 decimal numbers, use two’s complement and show the steps involved to solve for the difference, and show the difference in binary and decimal with 100% accuracy. 37. Without reference the student will explain the difference between a half adder and a full adder with 100% accuracy. 38. Without reference the student will draw a schematic showing how an eight-bit adder can be made using two four bit adders with 100% accuracy.
  • 3. Binary Addition •In decimal, when we add two numbers and they exceed the place value of a digit, we carry over. 1 9 10 + 3 10 12 10 •The same thing works in binary 1 12 + 12 10 2
  • 4. Binary Addition The four possible combinations of adding two binary numbers can be stated as follows: 0 0 + + 0 1 = = 0 1 carry carry 0 0 1 + 0 = 1 carry 0 1 + 1 = 0 carry 1
  • 5. Binary Addition A B SUM CARRY 0 0 0 0 0 1 1 0 1 0 1 1 0 CARRY 0 1 SUM 1 A B HALF ADDER- used for LSB, adds two input numbers outputs sum and carry.
  • 6. TEST Perform the following decimal additions. Convert the original decimal numbers to binary and add them. (A) 5 + 2 (B) 8 + 3 (C) 18 + 2 (D) 147 +75 (E) 31 + 7 We represent all binary numbers in groups of 8 because it’s the standard for most computers. 5 + 2 0 + 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 7 0 0 0 0 0 1 1 1 = 7 10
  • 7. Two’s Complement Representation The most widely used method of representing binary numbers and performing arithmetic in computer systems. Both positive and negative numbers can be represented in the same format and binary subtraction is greatly simplified. Two’s complement uses the most significant bit (MSB) of the 8bit number to signify whether the number is positive or negative. The MSB called the sign bit and is defined as 0 for positive numbers and 1 for negative numbers. D7 D6 D5 D4 D3 D2 D1D0 SIGN BIT
  • 8. Two’s Complement Representation A table of two’s-complement numbers can be developed by starting with some positive number and continuously subtracting 1
  • 9. STEPS FOR DECIMAL-TO-TWO’S-COMPLEMENT CONVERSION 1. If the decimal number is positive, the two’s-complement number is the true binary equivalent of the decimal number. +18 = 0001 0010 2. If the decimal number is negative, the two’s-complement number is found by: the (a) Complementing each bit of the true binary equivalent of decimal number ( one’s complement ). (b) Adding 1 to the one’s complement number to get the magnitude bits. The sign bit will always be 1.
  • 10. DECIMAL-TO-TWO’S-COMPLEMENT CONVERSION EXAMPLE Convert +35 to two’s complement SOLUTION: True Binary = 0010 0011 Two’s complement = 0010 0011
  • 11. DECIMAL-TO-TWO’S-COMPLEMENT CONVERSION EXAMPLE Convert -35 to two’s complement SOLUTION: True Binary = 0010 0011 One’s complement = 1101 1100 Add 1 Two’s complement = 1101 1101 +1
  • 12. STEPS FOR TWO’S-COMPLEMENT-TO-DECIMAL CONVERSION 1. If the two’s-complement number is positive (SIGN BIT = 0), do a regular binary-to-decimal conversion. 2. If the two’s-complement number is negative (SIGN BIT = 1), the decimal sign will be minus and the decimal number is found by: bit. (A) Complementing the entire two’s complement number, bit by (B) Adding 1 to arrive at the true binary equivalent. (C) Doing a regular binary-to-decimal conversion.
  • 13. STEPS FOR TWO’S-COMPLEMENT-TO-DECIMAL CONVERSION EXAMPLE Convert 1101 1101 two’s complement back to decimal. SOLUTION: The sign bit is 1 so decimal result will be negative. Two’s complement = 1101 1101 Complement = 0010 0010 Add 1 True binary +1 = 0010 0011 Decimal equivalent = -35 Answer
  • 14. Two’s Complement Arithmetic •All basic arithmetic functions involving positive and negative numbers can be dealt with simply by using 2’s complement. •Subtraction is done by adding the 2’s complement numbers. •Adding in 2’s complement, do regular binary addition. •Subtraction 2’s complement numbers, convert the number to be subtracted to a negative 2’s complement number and perform regular binary addition (5 - 3 = 5 + (-3). If the result is negative, the sign bit will be a 1.
  • 15. Two’s Complement Addition EXAMPLE Add 19 + 27 using 8-bit two’s complement arithmetic SOLUTION: 19 = 0001 0011 + 27 = 0001 1011 Sum = 0010 1110 = 46 decimal
  • 16. Two’s Complement Subtraction EXAMPLE Subtract 18 - 7 using 8-bit two’s complement arithmetic. 18 - 7 is the same as 18 + (-7), so add 18 plus negative 7. SOLUTION: Convert -7 to two’s complement True Binary +18 = 0001 0010 = 0000 0111 -7 = 1111 1000 One’s complement = 1111 1000 Add 1 +1 Sum = 0000 1011 = 11 Two’s complement = 1111 1001 Note: The carry-out of MSB is ignored. It will always occur for positive sums
  • 17. PRACTICE Covert the following decimal numbers to two’s complement form and perform the operation indicated. 5 (a) + (e) - 7 - 28 + 38 12 (b) - + 6 125 (f) 66 32 (c) - - 18 36 (g) 48 32 (d) (h) 18 - 36 48
  • 18. Binary Addition A B SUM CARRY 0 0 0 0 0 1 1 0 1 0 1 1 0 CARRY 0 1 SUM 1 A B HALF ADDER- used for LSB, adds two input numbers outputs sum and carry.
  • 19. HALF ADDER • Logic device that adds two binary numbers • Only adds Least Significant Digit (LSD) column (1s column) in binary addition Input Logic Symbol: Logic Diagram: A B Output Half Adder Σ (sum) C0 (carry out)
  • 20. FULL ADDER Used for adding binary place values other than the 1s place Input Logic Symbol: Logic Diagram: Cin A B Output Full Adder Σ (sum) C0 (carry out)
  • 21. FULL ADDER FULL ADDER A B C IN SUM 0 0 0 0 0 1 0 1 C OUT 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 1 1 0 1 0 1 1 1 0 1 C OUT A B C IN SUM
  • 22. PARALLEL ADDING • Use half adder for LSD • Use full adder for other digits A2 A1 A0 + B2 B1 B0
  • 23. En to ter be bin ad ary de nu PARALLEL ADDER mb d h ere ers 0 00 1 + 1 0 01 1 0 1 1 1 0 + 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 0 1 1 SUM appears here Parallel adders are availablehalf-adderform. in IC 1s place uses 2s, 4s, 8s places use full adders
  • 24.
  • 26. WHAT IS THIS ? B A 0 0 4321 4321 B4 B3 B2 B1 74LS83A A4 A3 A2 A1 s4 B4 s3 B3 s2 B2 s1 B1 Cin Cout A 0 0 1 1 B 0 1 0 1 out 0 1 1 0
  • 27. TEST 19. Given an 8-bit signed number state whether the number is positive or negative. 1001 1111 negative 20. Given an 8-bit signed number state the one’s complement of the number. 1001 1111 0110 0000 21. Given an 8-bit signed number state the two’s complement of the number. 1001 1111 0110 0000 +1 0110 0001
  • 28. TEST 22. Given two decimal numbers, use two’s complement form and show the steps to solve for the sum, and show the sum in binary and decimal. 100 0110 0100 26 0001 1010 + 0111 1110 = 126 23. Given two decimal numbers, use two’s complement form and show the steps to solve for the difference, and show the difference in binary and decimal. - 78 32 0010 0000 0100 1110 1101 1111 1110 0000 +1 1110 0000 0010 1110 = 46