GC03 Boolean Algebra

Similar documents
QUESTION BANK FOR TEST

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

1. Mark the correct statement(s)

Introduction to Computer Architecture

SWITCHING THEORY AND LOGIC CIRCUITS

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

Experiment 4 Boolean Functions Implementation

Logic Gates and Boolean Algebra ENT263

Department of Electrical Engineering McGill University ECSE 221 Introduction to Computer Engineering Assignment 2 Combinational Logic

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

IT 201 Digital System Design Module II Notes

EE292: Fundamentals of ECE

2008 The McGraw-Hill Companies, Inc. All rights reserved.

Chapter 3. Gate-Level Minimization. Outlines

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

Combinational Circuits

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

COMP combinational logic 1 Jan. 18, 2016

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

LAB #1 BASIC DIGITAL CIRCUIT

DKT 122/3 DIGITAL SYSTEM 1

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

Summary. Boolean Addition

Gate Level Minimization Map Method

ENGINEERS ACADEMY. 7. Given Boolean theorem. (a) A B A C B C A B A C. (b) AB AC BC AB BC. (c) AB AC BC A B A C B C.

UC Berkeley College of Engineering, EECS Department CS61C: Combinational Logic Blocks

UC Berkeley College of Engineering, EECS Department CS61C: Combinational Logic Blocks

2.6 BOOLEAN FUNCTIONS

Chap-2 Boolean Algebra

CS470: Computer Architecture. AMD Quad Core

IST 4 Information and Logic

CS 261 Fall Mike Lam, Professor. Combinational Circuits

END-TERM EXAMINATION

DIGITAL CIRCUIT LOGIC UNIT 7: MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

Digital Logic Design Exercises. Assignment 1

Boolean Algebra and Logic Gates

ECEN 468 Advanced Logic Design

Register Transfer Language and Microoperations (Part 2)

Introduction to Boolean logic and Logical Gates

LECTURE 4. Logic Design

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

Objectives: 1. Design procedure. 2. Fundamental circuits. 1. Design procedure

Chapter 2: Combinational Systems

ELCT201: DIGITAL LOGIC DESIGN

Injntu.com Injntu.com Injntu.com R16

Chapter 2 Boolean algebra and Logic Gates

Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

Basic Arithmetic (adding and subtracting)

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

Gate-Level Minimization

Arithmetic-logic units

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Code No: R Set No. 1

Binary Adders: Half Adders and Full Adders

Combinational Logic Circuits

01 Introduction to Digital Logic. ENGR 3410 Computer Architecture Mark L. Chang Fall 2006

Gate-Level Minimization

Department of Electrical and Computer Engineering University of Wisconsin - Madison. ECE/CS 352 Digital System Fundamentals.

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

Propositional Calculus. Math Foundations of Computer Science

CSE303 Logic Design II Laboratory 01

Lecture (04) Boolean Algebra and Logic Gates

Lecture (04) Boolean Algebra and Logic Gates By: Dr. Ahmed ElShafee

1. Fill in the entries in the truth table below to specify the logic function described by the expression, AB AC A B C Z

x = 12 x = 12 1x = 16

CS140 Lecture 03: The Machinery of Computation: Combinational Logic

CS 261 Fall Mike Lam, Professor. Logic Gates

ENGIN 112 Intro to Electrical and Computer Engineering

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

SYNERGY INSTITUTE OF ENGINEERING & TECHNOLOGY,DHENKANAL LECTURE NOTES ON DIGITAL ELECTRONICS CIRCUIT(SUBJECT CODE:PCEC4202)

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

DIGITAL ELECTRONICS. P41l 3 HOURS

Combinational Devices and Boolean Algebra

2. BOOLEAN ALGEBRA 2.1 INTRODUCTION

Combinational Logic II

CS/COE 0447 Example Problems for Exam 2 Spring 2011

Chapter 2 Basic Logic Circuits and VHDL Description

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Computer Organization and Levels of Abstraction

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

Chapter 2 Combinational

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

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

Computer Organization and Levels of Abstraction

Gate Level Minimization

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

Computer Science. Unit-4: Introduction to Boolean Algebra

LOGIC CIRCUITS. Kirti P_Didital Design 1

CSC 220: Computer Organization Unit 10 Arithmetic-logic units

Specifying logic functions

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

BOOLEAN ALGEBRA. 1. State & Verify Laws by using :

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

Combinational Logic Circuits

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

BOOLEAN ALGEBRA. Logic circuit: 1. From logic circuit to Boolean expression. Derive the Boolean expression for the following circuits.

ELCT201: DIGITAL LOGIC DESIGN

Chapter 2 Combinational Logic Circuits

Recitation Session 6

R07

Transcription:

Why study? GC3 Boolean Algebra Computers transfer and process binary representations of data. Binary operations are easily represented and manipulated in Boolean algebra! Digital electronics is binary/boolean based. Boolean Values Boolean algebra has only 2 values: true, false true has these other representations: T, false has these other representations: F, Boolean Variables A Boolean variable (a, b, Out) holds a single boolean value

Boolean Functions Function of boolean values and Boolean variables:- e.g with boolean variables a, b, c, d, e, f(a,b) = a.b : f is function of boolean variables a, b g(c,d,e) = c.(d +e) :g is function of boolean variables c, d, e. and + are boolean operators and and or respectively and is often represented by ^ as well as by. e.g. a.b = a ^ b = a and b or is often represented by v as well as by + e.g. a+b = a v b = a or b

Table Representation of Boolean Functions To the right is a truth table It shows how the function f(a,b) maps its inputs (a, b) to its output f(a,b). Each boolean variable can only have one of 2 values, so there are only 4 (2x2) possible input combinations of 2 boolean variables. Thus, this truth table completely defines all possible input-ouput combinations for this function f(a, b). Often a function, e.g. f(a,b) will be given the name of a boolean variable, e.g. c, so that we can redraw the truth table as shown right a b f(a,b) a b c

Basic Boolean Functions Function Name syntax truth table Not (inversion function) f(a) = not(a) = a a a AND NAND Circuit symbol Circuit symbol Note: nand(a,b) = not(and(a,b)) nand (a,a) = not(a) f(a, b) = and(a,b) = a.b f(a, b) = nand(a,b) = a.b a b a.b a b a.b

Basic Boolean Functions Function Name syntax truth table OR Note: sometimes call inclusive-or to differentiate from exclusive-or NOR Note: nor(a,b) = not(or(a,b)) nor (a,a) = not(a) f(a, b) = or(a,b) = a+b f(a, b) = nor(a,b) = a+b a b a+b a b a+b

Basic Boolean Functions Function Name syntax truth table XOR (exclusive-or) f(a, b) = xor(a,b) = a b Note: it is called exclusive-or to differentiate from inclusive or xor(a,a) = NXOR f(a, b) = nxor(a,b) = Note: nxor(a,b) = not(xor(a,b)) xnor (a,a) = a b N.B There are 6 functions of 2 boolean variables: and, nand, or, nor, xor, nxor, not are just 7 of the possible 6. a b a b a b a b

Function Representation by and, or and not The equation and truth table to the left are the same function. The equation can be obtained from the truth table to the left. How? Generate an and term for each row in the table with an output using the inputs,e.g not(a) and b, 2 or all the and terms together. You can read the table or the equation as reading: F(a,b) = when a.b= or a.b= f(a,b) = a.b + a.b a b f(a,b) a b a.b a b a.b a.b + a.b f(a,b)

Alternative Function Representation by and, or and not f(a,b) = (a + b). (a + b) a b f(a,b). Generate an or term for each row in the table with output, such that the or term produces a e.g. (a + b) = if a = b = (a + b) = for a=, b=. 2. and all the or terms together. F(a,b) = when a+b= or a+b= a b a+b a b a+b (a+b).(a+b) f(a,b)

Rules of Boolean Algebra or rules: and rules: + = + = + =. =. =. = Let a, b, c be boolean variables:- or rules: and rules: a + a.b = a a+ = +a = a+ = + a =a a. =.a = a a. = a. = a + a = a a. a = a a + a = a. a = a.(b + c) = a.b +a.c = b.a + c.a = (b+c).a Proof: a + a.b = a. + a.b = a.(+b) = a. = a

Function to right can be represented by both: f(a,b) = a.b + a.b f(a,b) = (a + b). (a + b) Check equivalence:- f(a,b) = (a + b). (a + b) f(a,b) = (a + b).a + (a + b).b = a. a + b. a + a.b + b.b = + b. a + a.b + b = + b. (a + a) + b = + b. + b = b + b = b a b f(a,b) f(a,b) = a.b + a.b f(a,b) = (a + a).b f(a,b) =.b f(a,b) = b These are examples of minimisation of boolean functions.

De Morgan s Theorems a.b = a + b not the variables 2 swap and for or 3 not the lot Consistency check a + b = a. b not the variables 2 swap or for and 3 not the lot a.b = a + b = (a + b) = a.b = a.b first rule group apply 2 nd rule to a + b Remove double inversions

Binary Addition Equation for adding 2 bits from 2 binary numbers for the i th bits:- r i + s i + c i = c i+.2 + t i r i and s i are the i th bits from the 2 numbers to be added. c i is the carry-in to the addition from the addition of the i- th bits c i+ is the carry out to the addition of the i+ th bits t i is the i th bit of the result bit c i r i s i t i c i+ Can express results of addition as 2 boolean functions:- t i = c i (r i s i ) c i+ = c i.(r i +s i ) + c i.r i.s i

Circuit for generation of results of addition of 2 bits with carry in:- 2-input xor gates r i s i r i s i t i t i = c i (r i s i ) c i 2-input or gates r i +s i c i.(r i +s i ) c i+ c i.r i.s i inverter gate 2-input and gate 3-input and gate c i+ = c i.(r i +s i ) + c i.r i.s i Full Bit Adder Circuit

4-bit Adder Each block is one full bit adder from previous slide. Need 4 blocks for 4 bit addition. c is set to Present 4-bit numbers on A and B inputs and result will appear on outputs just add more blocks to add larger number v A B A B A 2 B 2 A 3 B 3 c r o s o r c t sum s c 2 c r 2 2 c sum t 2 sum 2 s 2 c 3 c r 3 3 t o t 3 sum 3 s 3 c 4

Subtraction Don t build subtraction unit, but use 2 s complement to modify adder to perform subtraction. To do A-B, invert bits of B and add via c 2-input multiplexer: S = input output S = input output Add selectop = Subtract selectop = selectop A B A B A 2 B 2 2-input multiplexers A 3 B 3 s s s s s c in c out sum c in c out sum c in c out sum 2 c in c out sum 3

Two-input multiplexer (mux) allows of 2 inputs on to output Value ( or ) on s controls which input c or d goes to out c d s out Truth table for multiplexer (X is don t care) s c d out X X X X c drives output d drives output Boolean function for multiplexer: out = s.c + s.d Note: you now know how to build binary add/subtract unit from basic gates: and, or, not (xor is built from these)