Digital Electronics Part 1: Binary Logic

Similar documents
Why digital? Overview. Number Systems. Binary to Decimal conversion

12/31/2010. Digital Operations and Computations Course Notes. 01-Number Systems Text: Unit 1. Overview. What is a Digital System?

CS1800: Hex & Logic. Professor Kevin Gold

Introduction to digital systems. Juan P Bello

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

Digital Systems Overview. Unit 1 Numbering Systems. Why Digital Systems? Levels of Design Abstraction. Dissecting Decimal Numbers

Advanced Information Storage 02

Cs302 Quiz for MID TERM Exam Solved

Unit 8A Computer Organization. Boolean Logic and Gates

Digital Systems Roberto Muscedere Images 2013 Pearson Education Inc. 1

Week No. 06: Numbering Systems

of Digital Electronics

CS 226: Digital Logic Design

Computer Organization: Boolean Logic

Binary addition example worked out

Students should be able to (a) produce a truth table from a given logic diagram

E40M. Binary Numbers. M. Horowitz, J. Plummer, R. Howe 1

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Mark Redekopp, All rights reserved. Lecture 1 Slides. Intro Number Systems Logic Functions

School of Computer Science and Electrical Engineering 28/05/01. Digital Circuits. Lecture 14. ENG1030 Electrical Physics and Electronics

Switches: basic element of physical implementations

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

Intro To Digital Logic

Logic Theory in Designing of Digital Circuit & Microprocessor

ENGIN 112 Intro to Electrical and Computer Engineering

Information Storage and Spintronics 02

10/14/2009. Reading: Hambley Chapters

Counting, symbols, positions, powers, choice, arithmetic, binary, translation, hex, addresses, and gates.

CPE100: Digital Logic Design I

1 Computing System 2. 2 Data Representation Number Systems 22

Contents. Chapter 2 Digital Circuits Page 1 of 30

Introduction to Computer Engineering. CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison

Chapter 1 :: From Zero to One

0 volts. 2 volts. 5 volts

Implementation of Boolean Logic by Digital Circuits

Section 1A. Introduction & Basic Principles. Engineering Areas

Signals and Systems Digital Logic System

Introduction to CMOS VLSI Design Lecture 1: Introduction

Fundamentals of Digital Design

Lecture 22 Chapters 3 Logic Circuits Part 1

Number System conversions

SAU1A FUNDAMENTALS OF DIGITAL COMPUTERS

Chapter 2: Boolean Algebra and Logic Gates

Chapter 1. Binary Systems 1-1. Outline. ! Introductions. ! Number Base Conversions. ! Binary Arithmetic. ! Binary Codes. ! Binary Elements 1-2

Computer Science. 19. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section 6.1.

Introduction to Computer Engineering ECE 203

CSC9R6 Computer Design. Practical Digital Logic

Z = F(X) Combinational circuit. A combinational circuit can be specified either by a truth table. Truth Table

CMPE12 - Notes chapter 1. Digital Logic. (Textbook Chapter 3)

ENG2410 Digital Design Introduction to Digital Systems. Fall 2017 S. Areibi School of Engineering University of Guelph

Digital electronic systems are designed to process voltage signals which change quickly between two levels. Low time.

Computer organization

CSEN102 Introduction to Computer Science

Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary.

Floating Point Representation and Digital Logic. Lecture 11 CS301

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

CS/COE0447: Computer Organization and Assembly Language

UNIVERSITI TENAGA NASIONAL. College of Information Technology

CPE100: Digital Logic Design I

- Why aren t there more quantum algorithms? - Quantum Programming Languages. By : Amanda Cieslak and Ahmana Tarin

CpE358/CS381. Switching Theory and Logical Design. Summer

University of Florida EEL 3701 Summer 2015 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Tuesday, 30 June 2015

University of Florida EEL 3701 Fall 2014 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Wednesday, 15 October 2014

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Digital Logic (2) Boolean Algebra

Lecture 4 Modeling, Analysis and Simulation in Logic Design. Dr. Yinong Chen

Building a Computer Adder

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

Simple Interactions CS 105 Lecture 2 Jan 26. Matthew Stone

Boolean Algebra. The Building Blocks of Digital Logic Design. Section. Section Overview. Binary Operations and Their Representation.

CPE100: Digital Logic Design I

CHAPTER 2 NUMBER SYSTEMS

Gates and Logic: From Transistors to Logic Gates and Logic Circuits

Review for Test 1 : Ch1 5

CSE370: Introduction to Digital Design

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

We say that the base of the decimal number system is ten, represented by the symbol

COMBINATIONAL LOGIC CIRCUITS. Dr. Mudathir A. Fagiri

CHAPTER 7. Exercises 17/ / /2 2 0

Digital Logic and Design (Course Code: EE222) Lecture 1 5: Digital Electronics Fundamentals. Evolution of Electronic Devices

Organisasi dan Arsitektur Komputer L#1: Fundamental Concepts Amil A. Ilham

Lecture 7: Logic design. Combinational logic circuits

LOGIC GATES. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

Chapter 7. Sequential Circuits Registers, Counters, RAM

Numbers and Arithmetic

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

T02 Tutorial Slides for Week 6

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

DIGITAL LOGIC CIRCUITS

2.0 Basic Elements of a Quantum Information Processor. 2.1 Classical information processing The carrier of information

Gates and Logic: From Transistors to Logic Gates and Logic Circuits

Applications. Smartphone, tablet, game controller, antilock brakes, microprocessor, Wires

Computer Science. 20. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section

Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes

Electronic Devices and Circuits Lecture 15 - Digital Circuits: Inverter Basics - Outline Announcements. = total current; I D

Chapter 4: Combinational Logic Solutions to Problems: [1, 5, 9, 12, 19, 23, 30, 33]

DESIGN AND IMPLEMENTATION OF ENCODERS AND DECODERS. To design and implement encoders and decoders using logic gates.

Transcription:

Digital Electronics Part 1: Binary Logic

Electronic devices in your everyday life What makes these products examples of electronic devices? What are some things they have in common? 2

How do electronics communicate and manipulate information? How do devices like computers interpret human commands? How do electronic systems store information? How do they manipulation information? 3

How do electronics communicate and manipulate information? How do devices like computers interpret human commands? Humans provide inputs through keyboards, mice, touchscreens, knobs, etc. Each of these inputs is built into the circuit Example: calculator circuit shown in the image How do electronic systems store information? Circuits can have different states based on whether: switches are on/off knobs are turned high/low voltages are high/low... How do electronic systems manipulate information? Logic is built into the circuit We will discuss this more shortly 4

Programs stored in computer memory Some electronics can be programmed to perform new tasks without rewiring. Humans provide instructions to computers using high-level languages (like Python, C, Java, Ruby, ), which are then translated into machine language. Machine language is often in binary a number system that only uses 0 and 1. Why binary? What do these 1s and 0s represent? High-level programming language Machine language 5

Binary (Base 2) 6

Why use binary? Binary is a way to represent numbers using only 0 and 1. It s relatively easy and cheap to make circuit components that are either on or off (a two-state device). Computers are a combination of many, many such devices. 7

Data size You are likely familiar with file sizes: kilobytes, megabytes, etc. What do those sizes represent? Each binary digit (0 or 1) is called a bit (b). A group of 8 bits is called a byte (B). A group of 1000 bytes is a kilobyte (KB). A group of 10 6 bytes is a megabyte (MB). A group of 10 9 bytes is a gigabyte (GB). 8

What is binary? Binary is a way to represent numbers using only 0 and 1. You are accustomed to the decimal system, which is base 10. There are 10 digits that represent all numbers (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9). Binary is base 2, so it only has 2 digits (0 and 1). Consider the decimal system (base 10). What does each digit represent? 512 = 5 x 10 2 + 1 x 10 1 + 2 x 10 0 512 = 5 x 100 + 1 x 10 + 2 x 1 Binary is base 2. Only digits are 0 and 1. Each digit in a number represents a power of 2. To distinguish between decimal and binary numbers, use 0b before the digits or use subscript 2 at the end. 10101 2 = 0b10101 = 1 x 2 4 + 0 x 2 3 + 1 x 2 2 + 0 x 2 1 + 1 x 2 0 What decimal number is 10101 2 equal to? = 1 x 16 + 0 x 8 + 1 x 4 + 0 x 2 + 1 x 1 9

Quiz: binary and decimal 1. What is the largest decimal number we can represent with 8 binary digits? 2. How many binary digits do we need to represent the decimal number 55? 3. Which of these numbers are even? a. 100 2 b. 1100 2 c. 1000001 2 d. 011101011 2 4. Convert 0b110100 from binary to decimal. 5. Convert 123 from decimal to binary. 10

Limitations of binary Precision limitations, especially when we consider decimal and negative values Ex: How many bits are needed to represent a number between 0.00 10.00? Discrete vs continuous (digital vs analog). Only limited number of buckets conversion from analog to digital sometimes loses information. (example above is rounded to two decimal places) 11

Analog vs digital Analog - Continuous Digital - Discrete Examples: Mercury thermometers Phonographs (vinyl records) Scale that uses a sliding weight Examples: Digital thermometer CDs Digital scale Benefits: Could have an infinite number of values May be higher quality (e.g. original painting vs digital photogram) Benefits: Can be stored and manipulated by computers Values are less ambiguous: If data starts to degrade, it may be possible to recover it Digital circuits are less susceptible to noise 12

Binary, octal, and hexadecimal Binary is base 2. Digits are 0 and 1. Each digit represents a power of 2. 10101 2 = 1 x 2 4 + 0 x 2 3 + 1 x 2 2 + 0 x 2 1 + 1 x 2 0 = 21 Octal is base 8. Digits are 0, 1, 2, 3, 4, 5, 6, 7. Each digit represents a power of 8. 25 8 = 2 x 8 1 + 5 x 8 0 = 21 Hexadecimal is base 16. Digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F Each digit represents a power of 16. 15 16 = 1 x 16 1 + 5 x 16 0 = 21 13

ASCII table Characters can be converted to numbers using conventions like the ASCII table. 14

Converting from binary to octal or hexadecimal Binary to octal group 3 bits (add leading zeros if needed) 10101 2 10 101 2 = 25 8 010 2 = 2 101 2 = 5 Binary to hexadecimal group 4 bits (add leading zeros if needed) 10101 2 1 0101 2 = 15 16 0001 2 = 1 0101 2 = 5 15

Digital Boolean Logic 16

Analogy between devices, binary values, logic, and circuits In the following discussion we consider two-state inputs or outputs. Depending on the context, it may be helpful to consider the two options as off vs. on or false vs. true. Device Off On Binary 0 1 Logic False True Physical circuit Low voltage High voltage 17

Logic: AND Consider a device that should only perform an action (say, turn on a light) when Switch A and Switch B are both activated. What would that circuit look like? Lightbulb 1 2 AND Power supply Switch 1 Switch 2 Light Off Off Off On On Off On On 18

Logic: OR Consider a device that should only perform an action (say, turn on a light) when either Switch A or Switch B is activated. What would that circuit look like? Lightbulb 1 2 OR Power supply Switch 1 Switch 2 Light Off Off Off On On Off On On 19

Logic: NOT Consider a device that should only perform an action (say, turn on a light) when Switch A is not activated. What would that circuit look like? Lightbulb 1 NOT Switch 1 Off On Light Power supply 20

Logic gates: AND Logic gates are idealized representations of the AND, OR, and NOT actions you built with simple circuits. They are an abstract way to connect circuit inputs to circuit outputs. Switch 1 value Switch 2 value AND Lightbulb value 1 2 AND Input 1 Input 2 AND Output Switch 1 Switch 2 Light Off Off Off Off On Off On Off Off On On On Input 1 Input 2 Output Off Off Off Off On Off On Off Off On On On 21

Logic gates Input 1 Input 2 AND Output Input 1 Input 2 OR Output Input 1 Input 2 Output Off Off Off Off On Off On Off Off On On On Input 1 Input 2 Output Off Off Off Off On On On Off On On On On Input NOT Output Input Off On Output On Off 22

Logic gates Input 1 Input 2 AND Output Input 1 Input 2 OR Output Input 1 Input 2 Output Off Off Off Off On Off On Off Off On On On Input 1 Input 2 Output Off Off Off Off On On On Off On On On On Input 1 Input 2 NAND Output Input 1 Input 2 NOR Output Input 1 Input 2 Output Off Off On Off On On On Off On On On Off Input 1 Input 2 Output Off Off On Off On Off On Off Off On On Off 23

Integrated circuits Physically, logic gates are composed of transistors or diodes that act as switches, and they are often manufactured as part of integrated circuits. Notch Complementary metal-oxide-semiconductor (CMOS) devices (shown in the photo) are examples of integrated circuits. Example schematic 24