How a Digital Binary Adder Operates

Similar documents
Binary Adders: Half Adders and Full Adders

Lecture #21 March 31, 2004 Introduction to Gates and Circuits

Unit 2: Data Storage CS 101, Fall 2018

Chapter Three. Digital Components

ECEN 468 Advanced Logic Design

Experiment 7 Arithmetic Circuits Design and Implementation

CSE303 Logic Design II Laboratory 01

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit

Chapter 3: part 3 Binary Subtraction

Logic, Words, and Integers

Binary Values. CSE 410 Lecture 02

THE LOGIC OF COMPOUND STATEMENTS

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

Digital Systems and Binary Numbers

CURIE Academy, Summer 2014 Lab 1: Computer Engineering Hardware Perspective Sign-Off Sheet

Basic Arithmetic (adding and subtracting)

LOGIC CIRCUITS. Kirti P_Didital Design 1

Le L c e t c ur u e e 2 To T p o i p c i s c t o o b e b e co c v o e v r e ed e Variables Operators

COMBINATIONAL LOGIC CIRCUITS

This podcast will demonstrate a logical approach as to how a computer adds through logical gates.

CS140 Lecture 03: The Machinery of Computation: Combinational Logic

COMP combinational logic 1 Jan. 18, 2016

Combinational Logic Circuits

CS/COE 0447 Example Problems for Exam 2 Spring 2011

Software and Hardware

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Digital Logic Design Exercises. Assignment 1

Experimental Methods I

ECE 341 Midterm Exam

IA Digital Electronics - Supervision I

Von Neumann Architecture

Chapter 4 Arithmetic Functions

Introduction to Boole algebra. Binary algebra

Computer Architecture and Organization: L04: Micro-operations

Chapter 4. Combinational Logic

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

Real Digital Problem Set #6

EE292: Fundamentals of ECE

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

Addition and multiplication

6. Binary and Hexadecimal

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26)

Combinational Logic. Prof. Wangrok Oh. Dept. of Information Communications Eng. Chungnam National University. Prof. Wangrok Oh(CNU) 1 / 93

Lecture 10: Floating Point, Digital Design

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

Advanced Computer Architecture-CS501

Number System. Introduction. Decimal Numbers

Let s put together a Manual Processor

DIGITAL ELECTRONICS. Vayu Education of India

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition


ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Computer Organization

Introduction to Computer Science. Homework 1

Lecture (03) Binary Codes Registers and Logic Gates

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

Two-Level CLA for 4-bit Adder. Two-Level CLA for 4-bit Adder. Two-Level CLA for 16-bit Adder. A Closer Look at CLA Delay

DIGITAL ELECTRONICS. P41l 3 HOURS

Student Number: UTORid: Question 0. [1 mark] Read and follow all instructions on this page, and fill in all fields.

ARCHITECTURAL DESIGN OF 8 BIT FLOATING POINT MULTIPLICATION UNIT

ECE 30 Introduction to Computer Engineering

Arithmetic Logic Unit (ALU)

GO - OPERATORS. This tutorial will explain the arithmetic, relational, logical, bitwise, assignment and other operators one by one.

Code No: R Set No. 1

ANADOLU UNIVERSITY DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EEM Digital Systems II

Register Transfer Language and Microoperations (Part 2)

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

Boolean Arithmetic. From Nand to Tetris Building a Modern Computer from First Principles. Chapter 2

4. Write a sum-of-products representation of the following circuit. Y = (A + B + C) (A + B + C)

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

Combinational Logic II

CSE 20. Lecture 4: Number System and Boolean Function. CSE 20: Lecture2

Structural Modeling with Verilog

LAB #1 BASIC DIGITAL CIRCUIT

Arithmetic Circuits. Design of Digital Circuits 2014 Srdjan Capkun Frank K. Gürkaynak.

University of Toronto Mississauga. Flip to the back cover and write down your name and student number.

Revision: August 31, E Main Suite D Pullman, WA (509) Voice and Fax

CO Computer Architecture and Programming Languages CAPL. Lecture 9

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Electronic Engineering Part 1 Laboratory Experiment. Digital Circuit Design 1 Combinational Logic. (3 hours)

Binary Addition. Add the binary numbers and and show the equivalent decimal addition.

R10. II B. Tech I Semester, Supplementary Examinations, May

Review. LIBRARY list of library names; USE library.package.object; ENTITY entity_name IS generic declarations PORT ( signal_name(s): mode signal_type;

COMP 122/L Lecture 2. Kyle Dewey

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

GARDEN CITY UNIVERSITY. Bachelor of Computer Applications SEMESTER- I. Course: CONCEPTS OF PROGRAMMING USING C LANGUAGE CODE: 05ABCAR17111 CREDITS: 04

CSC 101: Lab #5 Boolean Logic Practice Due Date: 5:00pm, day after lab session

Fundamentals of Programming Session 2

Microcomputers. Outline. Number Systems and Digital Logic Review

ECE 341. Lecture # 6

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates. Invitation to Computer Science, C++ Version, Third Edition

Hardware Description Languages (HDLs) Verilog

16 Bit Low Power High Speed RCA Using Various Adder Configurations

Chapter 4. Operations on Data

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

Transcription:

Overview of a Binary Adder How a Digital Binary Adder Operates By: Shawn R Moser A binary adder is a digital electronic component that is used to perform the addition of two binary numbers and return the sum and carry of their values. These circuits are used throughout electronics in order to add, and even subtract, numbers together. To explain how a binary adder works, a few concepts must be explained: 1.) How numbers are represented in a binary number system and how arithmetic is performed on such numbers 2.) How logic gates operate on binary numbers 3.) How the half-adder, the building block to the full-adder, is constructed out of logic gates 4.) How The full adder is implemented using the half-adder 5.) How the full-adder can be chained together to produce an adder of any sized number Concepts Necessary to Understand a Binary Adder A binary adder relies on basic concepts of binary numbers and logic gates. In order to fully explain this product, a brief overview of these topics is in order. The most important of which is how numbers are represented in a binary, also referred to as base-2, number system. Binary Number Representation Numbers in the everyday world are expressed in a system referred to as base-10. This means that any number is made up of digits ranging from 0 through 9. In digital electronics, this numbering system does not work due to the difficulty of building circuits that except many discrete levels of electricity. For this reason, computers use a system of numbers consisting of only two discrete-levels called binary. In the binary number system, each digit can only be two values, either 1 or 0. Each individual digit that can have either of these values is referred to as a bit, which is short for binary digit. A group of bits can be used to represent any positive integer, just as any group of regular 0 through 9 digits can be used to represent a number in the standard base-10 system. In order to create the adder, an understanding of how binary numbers correspond to their base-10 counterparts needs to be explained. Binary numbers are converted to decimal through the following simple process: 1.) Each bit in a binary number is arranged in increasing order of significance, with the left-most bit being the most significant to the right-most being the least significant. This is the same as a base-10 number, where the right-most number is the least significant. 2.) The right-most bit is given the value of 2 0, the next bit 2 1, and so on until the last bit in the number is reached. 1

3.) The binary number is then processed by each individual bit. Depending on the bits value, it is or is not added to an initial 0 sum for the number: If the bit has the value of 1, then that bits corresponding power of 2 is added to the sum If the bit has the value of 0, then that bits corresponding power of 2 is not added to the sum. With this process, any generic binary number can be converted to a base-10 number. In addition to the binary number system, there is one other concept that the binary adder relies upon: logic gates. Logic Gate Types Logic gates are simple electronic circuits that perform Boolean logical functions. Logic gates are basic building blocks for most digital circuits. Often in circuit design, and in the case of the adder, they have two inputs and one output. They represent logical function in circuitry, such as Boolean AND, OR, and NOT. The way that these logical functions work is by outputting a value depending on the particular input combination. A metaphor for such gates is to think of them as a junction of pipes. The pipe coming out of the gate will only allow water to flow out of it if certain pipes going into the gate have water flowing from them. The adder is made with AND, OR, and exclusive OR gates. The AND Gate The AND gate has two single-bit inputs. The gate outputs a value of 1 if both inputs are a 1. Otherwise, the gate outputs a binary value 0. The OR Gate Figure #1: The 2-Input AND Gate Symbol The OR gate takes two inputs that can be either binary value. The gate will output a value of 1 if either, or both input are 1. Otherwise, the get outputs a binary value 0. Figure #2: The 2-Input OR Gate Symbol 2

The Exclusive OR Gate The exclusive OR, or XOR for short, gate has two single-bit inputs. The gate will output a value of 1 if only an individual input has the value 1. The gate will output a binary-value 0 if both inputs have a matching value. Figure #3: The 2-Input XOR Gate Symbol Each of the logic gates can be attached directly to a voltage corresponding a binary 0 or a binary 1. The inputs of each can be wired to one another, meaning that the output of one gate can be used as the input of another gate. These gates are attached together in a particular manner to create the half-adder circuit. Construction of a Half-Adder: Building Block to a Full-Adder An adder for a binary number is first made using what is called a half-adder. This adder is called a halfadder because it will add two single bits and produce a carry that will be used for the next-highest order bit. This is compared to the full-adder which will make use of the carry bit of a previous addition in order to add a set of binary digits together. The half-adder has the following logic table: Inputs Outputs Operand 1 Operand 2 Carry Sum 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 Table #1: Logic Table for the half-adder circuit As one can see, this half-adder will sum the two operand, which are the inputs, and output a sum of 1 if only one of the inputs is 1 and output a carry of 1 if both of the inputs is 1. This is synonymous with the concept of addition of regular numbers, where if the sum of two digits is greater than 9, then higher digit is carried over to the next highest order number. This circuit output is created using a combination of the previously mentioned XOR and AND gates. Each gate will handle a component of the outputs: the AND gate will take the inputs and output the carry bit and the XOR gate will take the inputs and output the Sum bit. 3

Figure #4: Half-Adder Circuit Source: Mano, M. & Cilletti, M. (2013). Digital Design 5 th Edition. New Jersey: Prentice Hall. Construction of a Full-Adder The full-adder is an extension of the half-adder. The adder works by taking the carry bit from a previous full-adder, and using it in the addition of the two operand bits. This means, that this adder can be used to add together binary numbers that consist of more than one bit. This adder functions by taking in to consideration this carry bit, the two operands, and passing them through a set of gates that will create a sum output. Table #2 shows the logic table for the carry and the sum outputs considering the input of operand 1 and operand 2 along with a carry-over input that may come from any previous adders. Input Output Operand 1 Operand 2 Carry-Over Carry Sum 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 Table #2: Logic Table for the full-adder circuit The implementation of the full-adder is performed by chaining together two separate half-adder circuits. The first half-adder s sum output is connected to input of the second half-adder. Along with this, the carry-over from any previous adder, which is also a binary value, is used as the second input to the second half-adder. The sum output from this second adder is used to determine the sum that is output for the adder device. The carry from the first half-adder is connected to an OR gate along with the carry from the second halfadder. By using an OR gate, the output for the full-adder s carry will be 1 if either of the carry bits from the half-adders are 1. Figure #5 shows the circuit diagram for the full-adder and outlines the location of each half-adder contained within the full-adder. 4

Figure #5: Full-Adder Sum Circuit Source: Mano, M. & Cilletti, M. (2013). Digital Design 5 th Edition. New Jersey: Prentice Hall. The full-adder, unlike the half-adder, can account for the carry of bits from other bit adders. By connecting the carry from a previous adder to the carry-over of another full-bit adder, the adders can be chained together in manner that will allow them to operate on operands existing of multiple bits. Construction of a Multiple-Bit Adder Full-adder circuits can then be chained together so that binary number representations consisting of more than one bit can be added together. To do so produces a ripple-carry adder. Figure #4 displays how two full-adder circuits, represented by the boxes for each, can be wired together to add two numbers, each consisting of three bits. Each full-adder receives a single bit input for that particular bit position of both binary operands, along with a carry from the adder for the less-significant bit. Figure #4: A chained 3-bit adder Adder circuits like these can be used to sum any integer value, as long as enough full-adders are added together. Most digital electronics make large use of such circuits, and they can be found in billions of devices throughout the world. 5