Introduction to Computer Science - Lecture 6

Slides:



Advertisements
Similar presentations
ADDER, HALF ADDER & FULL ADDER
Advertisements

Combinational Circuits
التصميم المنطقي Second Course
CSE-221 Digital Logic Design (DLD)
08/07/041 CSE-221 Digital Logic Design (DLD) Lecture-8:
Section 10.3 Logic Gates.
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
Lecture 3. Boolean Algebra, Logic Gates
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
CS 105 Digital Logic Design
XOR, XNOR, and Binary Adders
Digital Logic Lecture 08 By Amr Al-Awamry. Combinational Logic 1 A combinational circuit consists of an interconnection of logic gates. Combinational.
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
1 Introduction to Abstract Mathematics Applications : Digital Logic Circuits 2.4 and Number Systems 2.5 Instructor: Hayk Melikya
Binary Addition CSC 103 September 17, 2007.
Logic gates & Boolean Algebra. Introduction Certain components (called logic elements) of the computer combine electric pulses using a set of rules. Electric.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
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.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Lecture 9 Topics: –Combinational circuits Basic concepts Examples of typical combinational circuits –Half-adder –Full-adder –Ripple-Carry adder –Decoder.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Linear Algebra. Circuits The circuits in computers and other input devices have inputs, each of which is either a 0 or 1, the output is also 0s and 1s.
Universal college of engineering & technology. .By Harsh Patel)
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
Logic Gates M. AL-Towaileb1. Introduction Boolean algebra is used to model the circuitry of electronic devices. Each input and each output of such a device.
Combinational Circuits
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
Logic Gates and Boolean Algebra Introduction to Logic II.
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
C OMBINATIONAL L OGIC D ESIGN 1 Eng.Maha AlGubali.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
Programming for GCSE Topic 9.2: Circuits for Adding T eaching L ondon C omputing William Marsh School of Electronic Engineering and Computer Science Queen.
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Dr.Ahmed Bayoumi Dr.Shady Elmashad
CSCI-100 Introduction to Computing
Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates,
Digital Systems Section 8 Multiplexers. Digital Systems Section 8 Multiplexers.
CHAPTER 3 SETS AND BOOLEAN ALGEBRA
Combinational Circuits
Computer Architecture CST 250
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.
XOR, XNOR, and Binary Adders
CS105 Introduction to Computer Concepts GATES and CIRCUITS
Fundamentals of Computer Science Part i2
Digital Electronics & Logic Design
XOR, XNOR, & Binary Adders
ECE 301 – Digital Electronics
Week 7: Gates and Circuits: PART II
Digital Logic.
Number Systems and Circuits for Addition
Logic Gates.
Digital Systems Section 12 Binary Adders. Digital Systems Section 12 Binary Adders.
Logic Gates.
13 Digital Logic Circuits.
Digital Logic.
DIGITAL ELECTRONICS B.SC FY
Chapter 10.3 and 10.4: Combinatorial Circuits
Combinational Circuits
Logic Circuits I Lecture 3.
XOR, XNOR, and Binary Adders
Electronics for Physicists
XOR Function Logic Symbol  Description  Truth Table 
XOR, XNOR, and Binary Adders
Chapter 11 (Part 2): Boolean Algebra
Presentation transcript:

Introduction to Computer Science - Lecture 6 Boolean Algebra, digital circuits

Data processing After previous lectures we know how to encode and store information It is time to consider how to process information

Data processing Data processing is the process of inferring new information based on previously known information. An example of data processing is computing the average salary in a company based on the salaries of every employee of the company.

Data processing One of the simpler (though not elementary) mechanisms of data processing is adding of two integer numbers. In order to perform this operation, computers make use of digital circuits built of logic gates.

Logic gates A logic gate represents an electronic circuit which has one or more input signals and exactly one output signal For technical reasons, these signals are always 0 (interpreted as no signal) or 1 (interpreted as a non-zero signal) Logic gates can be represented by a so called truth table.

Logic gates Source: https://sites.google.com/site/bigitodebil/home/bramki-logiczne

Boolean algebra Logic gates can be combined into more complicated circuits Mathematical model of these operations is the Boolean algebra

Boolean algebra Boolean algebra is the following algebraic structure: BA = (B, ∩,∪,~,0,1) where: B - any set ∩,∪ - two-argument functions ~ - one-argument function 0,1 - selected elements from B

Boolean algebra For electronic applications we use: B = {0,1} ∩ - logical product (AND) ∪ - logical sum (OR) ~ - logical negation (NOT)

Boolean algebra Logic circuit is every function f:Bn→ Bm built with ∩, ∪ and ~ The letters x,y,z will denote logical variables assuming the values 0 and 1. An example of a logical circuit is the function: f(x,y) = (x ∩ ~y) ∪ ~(~y ∪ ~x)

Gray code Let’c consider standard binary 3-bit codes: 000 1 001 2 010 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111

Gray code Note that the codes for 3 and 4, despite of being neighbours, differ by 3 bits. In some electronic applications (eg. in Karnaugh optimiziation) it is useful to have a coding in which every two neighbouring codes only differ by one bit. Such code was proposed Frank Gray

Gray code Construction of n-bit Gray code with the use of a table: if n=1, the Gray code is 0,1 n-bit Gray code is constructed by: noting the n-1 bit Gray code and prepending 0 to each code noting the n-1 bit Gray code in reverse and prepending 1 to each code

Gray code Finding the i-th number in the n-bit Gray code Write i in the standard binary code. Fill with zeros if necessary. Write also the same number but shifted right by one bit. The rightmost bit is discarded. On the first position write 0. Perform a bitwise XOR.

Adders Let’s consider the following circuit: Source: M. Pudełko “Urządzenia techniki komputerowej”

Adders This is the half adder. It is used to build full adders.

Adders A full adder has three inputs: Outpus of the adder are: Ai - i-th bit of the first number Bi - i-th bit of the second number Ci-1 - carry over bit from the previous position Outpus of the adder are: Si - sum Ci - carry over bit for the next position

Adder A full adder:

Sources http://zto.ita.pwr.wroc.pl/~luban/uklady_kom/sum/sum.html M. Pudełko: “Urządzenia techniki komputerowej” http://slideplayer.pl/slide/2797581/

Thank you for your attention!