1’S COMPLEMENT REPRESENTATION 1’s complement of a number (binary) is obtained by changing all 1’s to 0 and all 0’s to 1. If one of these numbers is positive.

Slides:



Advertisements
Similar presentations
ENGIN112 L7: More Logic Functions September 17, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 7 More Logic Functions: NAND, NOR,
Advertisements

Logic Gates.
Lecture 6 More Logic Functions: NAND, NOR, XOR and XNOR
Exclusive-OR and Exclusive-NOR Gates
Combinational Circuits
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR, Parity Circuits, Comparators.
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
Boolean Algebra and Logic Gate
CS 151 Digital Systems Design Lecture 7 More Logic Functions: NAND, NOR, XOR.
Relationship Between Basic Operation of Boolean and Basic Logic Gate The basic construction of a logical circuit is gates Gate is an electronic circuit.
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
Chapter 4 Logic Gates and Boolean Algebra. Introduction Logic gates are the actual physical implementations of the logical operators. These gates form.
Lecture 3. Boolean Algebra, Logic Gates
CSCI 1412 Logic Gates Parminder Kang Home: Phones OFF Please.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Logic Gates Combinational Circuits
Mantıksal Tasarım – BBM231 M. Önder Efe
+ CS 325: CS Hardware and Software Organization and Architecture Exam 1: Study Guide.
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
Module 3.  Binary logic consists of :  logic variables  designated by alphabet letters, e.g. A, B, C… x, y, z, etc.  have ONLY 2 possible values:
©zaher elsir Sudan Academy for Banking & Financial Sciences Decimal Number System Base (Radix)10 Digits0, 1, 2, 3, 4, 5, 6, 7, 8, 9 e.g The magnitude.
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Logic gates & Boolean Algebra. Introduction Certain components (called logic elements) of the computer combine electric pulses using a set of rules. Electric.
Logic and Digital System Design - CS 303
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Digital Electronics. Introduction to Number Systems & Codes Digital & Analog systems, Numerical representation, Digital number systems, Binary to Decimal.
DeMorgan Theorem, Computer Simulation Exercises
Course contents Chapter 1 - section 1.6 Chapter 2 - all sections Chapter – 4.7, and 4.12 Chapter , Chapter 6 - all sections.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
LOGIC GATES.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
Exclusive OR Gate. Logically, the exclusive OR (XOR) operation can be seen as either of the following operations:exclusive OR (XOR) 1. A AND NOT B OR.
LOGIC GATES AND CIRCUITS Digital systems are said to be constructed by using logic gates. These gates are the AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates.
Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009.
Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output.
1 EG 32 Digital Electronics Thought for the day You learn from your mistakes..... So make as many as you can and you will eventually know everything.
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
Logic Gates Informatics INFO I101 February 3, 2003 John C. Paolillo, Instructor.
1 Understand the examples again Overflow –When two positive numbers added together or a negative number subtracted from a positive number yields negative.
1 EENG 2710 Chapter 2 Algebraic Methods For The Analysis and Synthesis of Logic circuits.
CHAPTER 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs
5 - Digital Logic with Boolean Algebra
Introduction * Binary numbers are represented with a separate sign bit along with the magnitude. * For example, in an 8-bit binary number, the MSB is.
Logic Gates. A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment,
C.S. Choy21 BOOLEAN ALGEGRA The Mathematics of logic Boolean variables have only two possible values (binary) Operators:. Product+ SumComplement A.B A+B.
Module 7.  In Module 3 we have learned about NAND gate – it is a combination of AND operation followed by NOT operation  Symbol A. B = Y  Logic Gate.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
The inverter performs the Boolean NOT operation. When the input is LOW, the output is HIGH; when the input is HIGH, the output is LOW. The Inverter AX.
BINARY SYSTEMS ENGR. KASHIF SHAHZAD 1. BINARY NUMBERS 1/2 Internally, information in digital systems is of binary form groups of bits (i.e. binary numbers)
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
DATA REPRESENTATION IN COMPUTER MEMORY.  Describe the coding system:  Sign and magnitude  1’s Complement and 2’s Complement  Binary Coded Decimal.
Hoda Roodaki Boolean Algebra Hoda Roodaki
Logic Gates and Boolean Algebra
Chapter 3 Notes – Part II Review Questions
Logic Gates and Boolean Algebra
Logic Gates.
Logic Gates Benchmark Companies Inc PO Box Aurora CO
KS4 Electricity – Electronic systems
KS4 Electricity – Electronic systems
Digital Electronics & Logic Design
Week 7: Gates and Circuits: PART II
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Logic Gates.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Digital Systems and Binary Numbers
KS4 Electricity – Electronic systems
DIGITAL ELECTRONICS B.SC FY
Department of Electronics
DIGITAL ELECTRONICS AND LOGIC GATES. ANALOG SIGNAL:- Analog signal is continuous time varying current or voltage signal.
Presentation transcript:

1’S COMPLEMENT REPRESENTATION 1’s complement of a number (binary) is obtained by changing all 1’s to 0 and all 0’s to 1. If one of these numbers is positive then the other number will be negative. Ex := Binary number is (1001) 2 1’s complement is (0110) 2

2’s Complement Representation 2’s complement of a binary number is obtained by adding 1 to the LSB of 1’s complement of that number. Ex:= Binary number is ( ) 2 1’s complement  ( ) ’s complement of ( ) 2 is ( ) 2

1’S COMPLEMENT SUBTRACTION Subtraction of binary numbers using 1’s complement allows subtraction only by addition. A) Subtraction of smaller number from larger number 1) Determine the 1’s complement of the smaller number. 2) Add this to the larger number. 3) There is always a carry. 4) Remove the carry and add it to the result

1’S COMPLEMENT SUBTRACTION Example: Subtract 1010 from 1111 using 1’s complement. Also subtract using direct method and compare. Soln: Direct Subtraction1’s complement method ’s comp carry Add carry

1’S COMPLEMENT SUBTRACTION B) Subtraction of larger number from smaller number 1) Determine the 1’s complement of the larger number. 2) Add this to the smaller number. 3) There is no carry. 4) To get an answer in true form, take the 1’s complement and change the sign.

1’S COMPLEMENT SUBTRACTION Example: Subtract 1010 from 1000 using 1’s complement. Also subtract using direct method and compare. Soln: Direct Subtraction1’s complement method ’s comp No Carry True answer: (1’s comp

Signed Binary Number Representation Binary numbers are represented with a separate sign bit along with the magnitude. In 8 bit binary number, the MSB is the sign bit and remaining 7 bits is the magnitude. The magnitude part contains binary equivalent for +ve numbers, while 2’s complement form for negative numbers. Ex: NumbersSignMagnitude

Signed no. addition using 2’s Complement Method Case 1: Two positive numbers (Augend) (Addend) (Sum = +48) Case 2: Positive augend & negative addend (Augend) (Addend)-2’s comp (Sum = +17) Discarded

Signed no. addition using 2’s Complement Method Case 3: Positive addend & negative augend (Augend) (Addend) (Sum = -18)-2’s comp Case 4: Two negative numbers (Augend) (Addend) (Sum = -76)-2’s comp discarded

Signed no. Subtraction using 2’s Complement Method Case 1: Two positive numbers (Minuend) (Subtrahend)-2’s comp (Sum = +9) Case 2: Positive no. & smaller Negative no (Minuend) (Subtrahend)-2’s comp (Sum = +60) discarded

Signed no. Subtraction using 2’s Complement Method Case 3: Positive No. & larger Negative No (Minuend) (Subtrahend)-2’s comp (Sum = +62) Case 4: Two negative numbers (Minuend) (Subtrahend)-2’s comp (Sum = -24)

Digital Principle Digital Signals A signal is called as digital signals if it has only finite number of predetermined distinct magnitudes. Logic Gates : Logic gates are decision making electronic circuit, which will check particular decision for input signal. LOGIC GATES Basic gates Universal gates Special purpose gate NOT gate NAND gate Ex-OR gate AND gate NOR gate Ex-NOR gate OR gate

NOT Gate is a basic gate having only one input and only one output. The Boolean expression for NOT gate is Y = A. From the truth table, when input is 1, output is 0 and when input is 0, output is 1. Hence the NOT gate is also called as inverter or complementary gate. Input AOutput Y=A A Y = A Symbol Truth Table

AND Gate is a basic gate having two or more than two inputs and only one output. The output of AND gate is 1, when all the inputs are logic 1, otherwise output of AND gate is logic 0. InputOutput ABY A Y = A.B B Symbol Truth Table

OR Gate is a basic gate having two or more than two inputs and only one output. The output of OR gate is 1 when any one input or all the inputs are logic 1 otherwise output of OR gate is logic 0. InputOutput ABY A Y= A+B B Symbol Truth Table

Universal Gates Universal gates are of two types, NAND gate NOR gate They are called as universal gates because with the help of these gates, we can derive any basic gate such as AND, OR & NOT gate or any combination of these basic gates.

NAND Gate is a universal gate which has two or more than two inputs and only one output. NAND gate is a combination of AND gate and NOT gate. When any one input or all the inputs of NAND gate are 0, then output of NAND gate is logic 1, otherwise output of NAND gate is logic 0. InputOutput ABY A Y= A.B B B A Symbol Truth Table

NOR Gate is a universal gate having two or more than two inputs and only one output. NOR gate is a combination of OR gate and NOT gate. The output of NOR gate is 1 when any one input or all the inputs are logic 1 otherwise output of NOR gate is logic 0. InputOutput ABY A Y= A+B B A B Symbol Truth Table

Implementation of Basic Gates Using Universal Gates NAND gate as a Universal gate 1) NOT gate using NAND gate 2) AND gate using NAND gate 3) OR gate using NAND gate NOR gate as a Universal gate 1) NOT gate using NOR gate 2) AND gate using NOR gate 3) OR gate using NOR gate

NOT gate using NAND gate Output is given by, Y= A.B = A. A = A A Y B Input

AND gate using NAND gate Boolean expression for AND gate is, Y=A.B =A.B Y=A.B A A.B B

OR gate using NAND gate Boolean expression for OR gate is, Y= ( A ).( B ) = A + B A A B B Y= A+B

NOT gate using NOR gate Boolean expression for NOT gate is, Y= A+B = A+A = A Input

AND gate using NOR gate Boolean expression for AND gate is, Y= ( A )+( B ) = A. B

OR gate using NOR gate Boolean expression for OR gate is, Y=A+B =A+B

Exclusive / Special Purpose Gate Ex-OR Gate Ex-NOR Gate

Ex-OR Gate It is a special purpose gate having two or more than two inputs and only one output. When both the inputs are equal, the outputs is 0, otherwise 1. A B Y= A B + InputOutput ABY Symbol Truth Table

Ex-NOR Gate A B Y= A B + InputOutput ABY  It is a special purpose gate having two or more than two inputs and only one output.  When both the inputs are equal, output is 1, otherwise 0. Symbol Truth Table

Demorgan’s Theorems Demorgan’s 1 st Theorems: It state that compliment of product is equal to sum of the compliment. A.B=A+B Demorgan’s 2nd Theorems: It state that compliment of sum is equal to product of the compliment. A+B=A.B

Sum of Product The logical sum of two or more logical product term is called as sum of product expression. It is basically an OR operation of AND operated variables such as Y=AB+BC+AC

Product of Sum The logical product of two or more logical sum term is called as product of sum expression. It is basically an AND operation of OR operated variables such as Y=(A+B+C).(A+B+C)