Conversion and Coding (12) 10. Conversion and Coding (12) 10 1100 Conversion.

Slides:



Advertisements
Similar presentations
ADDER, HALF ADDER & FULL ADDER
Advertisements

Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
Conversion and Coding (12)10.
التصميم المنطقي Second Course
Parallel Adder Recap To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition. The.
CSE-221 Digital Logic Design (DLD)
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
Digital Arithmetic Wen-Hung Liao, Ph.D.. Objectives Perform binary addition, subtraction, multiplication, and division on two binary numbers. Add and.
Combinational circuits
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Registers and Counters
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Chapter 7 Arithmetic Operations and Circuits Hexadecimal Arithmetic 4 binary bits represent a single hexadecimal digit Addition –Add the digits.
Registers and Counters
Logic Gates Combinational Circuits
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
CS 105 Digital Logic Design
Digital Systems © Korea Univ. of Tech. & Edu. Dept. of Info. & Comm. Chap. 6 Digital Arithmetic 6-1 Chap. 6 Digital Arithmetic: Operations & Circuits n.
ReVieW Combinational & Sequential Logic Circuit EKT 221 / 4 DIGITAL ELECTRONICS II.
ECE 101 An Introduction to Information Technology Digital Logic.
Binary Numbers.
Chapter 6 Digital Arithmetic: Operations and Circuits ECE 221 Intro
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
ADDERS Half Adders Recall that the basic rules of binary addition are as indicated below in Table 2-9. A circuit known as the half-adder carries out these.
P. 4.1 Digital Technology and Computer Fundamentals Chapter 4 Digital Components.
Power Point Presentation Donald Bearden CS 147 September 13, 2001.
Topic: Arithmetic Circuits Course: Digital Systems Slide no. 1 Chapter # 5: Arithmetic Circuits.
1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers.
ENG241 Digital Design Week #8 Registers and Counters.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
Arithmetic Circuits. Half Adder ABSumCarry
ARITHMETIC MICRO OPERATIONS
Universal college of engineering & technology. .By Harsh Patel)
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
Combinational Circuits
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
Counters and Registers Synchronous Counters. 7-7 Synchronous Down and Up/Down Counters  In the previous lecture, we’ve learned how synchronous counters.
Digital Electronics.
Combinational Logic Design
CEC 220 Digital Circuit Design
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
5.3 Sequential Circuits - An Introduction to Informatics WMN Lab. Hey-Jin Lee.
Lecture No. 14 Combinational Functional Devices. Digital Logic &Design Dr. Waseem Ikram Lecture 14.
Chapter 6. Digital Arithmetic: Operations and Circuits
Digital Arithmetic Wen-Hung Liao, Ph.D..
EKT 221 : Digital 2 COUNTERS.
Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates,
Digital Fundamentals Floyd Chapter 6 Tenth Edition
Reference: Moris Mano 4th Edition Chapter 4
Principles & Applications
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
Digital System Design Review.
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
Chapter 6 Functions of Combinational Logic
Chapter 4 Combinational Logic
Combinational Circuits
Number Systems and Circuits for Addition
XOR Function Logic Symbol  Description  Truth Table 
Arithmetic Circuits.
Half & Full Subtractor Half Subtractor Full Subtractor.
Instruction execution and ALU
Half & Full Subtractor Half Subtractor Full Subtractor.
Computer Architecture
Presentation transcript:

Conversion and Coding (12) 10

Conversion and Coding (12) Conversion

Conversion and Coding (12) Conversion Coding (using BCD code for each digit)

BCD Adder Design a circuit that calculates the Arithmetic addition of two decimal digits carry

BCD Adder Maximum sum is = 19 Max digit Carry from previous digits

BCD adder (sum up to 9) NumberCS8S4S2S

BCD adder (sum up to 9) NumberCS8S4S2S The sum is the same with BCD adder

BCD adder (sum is 10 to 19) NumberCS8S4S2S

BCD adder (sum is 10 to 19) Number CS8S4S2S KZ8Z4Z2Z Binary sum BCD adder sum

BCD adder (sum is 10 to 19) Number CS8S4S2S KZ8Z4Z2Z Binary sum BCD adder sum

BCD adder (sum is 10 to 19) Number CS8S4S2S KZ8Z4Z2Z Binary sum BCD adder sum +6

Algorithm for BCD Adder If sum is up to 9 Use the regular Adder. If the sum > 9 Use the regular adder and add 6 to the result

When is the result > 9 Number KZ8Z4Z2Z Binary sum C = K +

When is the result > 9 Number KZ8Z4Z2Z Binary sum C = K + Z8*Z4+

When is the result > 9 Number KZ8Z4Z2Z Binary sum C = K + Z8*Z4+ Z8*Z2

BCD Adder 4-bit Adder 00 z8 z4z2z1 s8 s4s2s1 Cin K

Arithmetic Circuits

Half Adder ABSumCarry

Half Adder

Full Adder ABCinSumCout

Full Adder

Implementing a Full adder using two half adders

Parallel Binary Adder

Parallel Binary adder Two Numbers X & Y Each number is represented using 6 bits. [X]=X o X 1 X 2 X 3 X 4 X 5 [Y]=Y o Y 1 Y 2 Y 3 Y 4 Y 5

Complete Parallel Adder With Registers D Flip-flops are used to save a single bit A number of D flip-flops are connected in a way to form the binary number, where each bit of that number is saved in a single D flip-flop.

Example: Sequence of operations in Adding 1001 and ) [A] = A CLEAR pulse is applied to CLR of each FF on register A at t 1. 2) [M]  [B]. The first binary number 1001 is transferred from memory to B register on the PGT of the LOAD pulse at t 2. 3) [S]  [A]. With [B] = 1001 and [A] = 0000, the full adders produce a sum of 1001 which is transferred to A register on the PGT of the TRANSFER pulse at t 3. This makes [A] = ) [M]  [B]. The second binary number 0101 is transferred from memory to B register on the PGT of the second LOAD pulse at t 4. This makes [B] = ) [S]  [A]. With [B] = 0101 and [A] = 1001, the full adders produce a sum of 1110 which is transferred to A register on the PGT of the second TRANSFER pulse at t 5. This makes [A] = 1110.

Integrated Circuit Parallel Adder ( IC Parallel Adder ) 4- Bits adder

8 – Bit IC Parallel Adder

BCD Adder

When the sum of two digits is less than or equal to 9 then the ordinary 4-bit adder can be used But if the sum of two digits is greater than 9 then a correction must be added “I.e adding 0110” We need to design a circuit that is capable of doing the correct addition

BCD Adder The cases where the sum of two 4-bit numbers is greater than 9 are in the following table: S4S3S3 S2S2 S1S1 S0S

BCD Adder Whenever S 4 =1 (sums greater than 15) Whenever S 3 =1 and either S 2 or S 1 or both are 1 (sums 10 to 15) The previous table can be expressed as: X = S 4 + S 3 ( S 2 + S 1 ) So, whenever X = 1 we should add a correction of 0110 to the sum.

Inputs:[A]=0101, [B]= 0011, C o =

Inputs:[A]=0111, [B]= 0110, C o =

BCD Adder Cascading BCD Adders The previous circuit is used for adding two decimal digits only. That is, “ = 13”. For adding numbers with several digits, a separate BCD adder for each digit position must be used. For example: ?

Cascading BCD Adders

Example Determine the inputs and the outputs when the above circuit is used to add 538 to 247. Assume a CARRY IN = 0 Solution: Represent the decimal numbers in BCD 247 = = Put these numbers in registers [A] and [B] [A] = [B] =

Example