Digital Electronics and Computer Interfacing Tim Mewes 3. Digital Electronics.

Slides:



Advertisements
Similar presentations
ADDER, HALF ADDER & FULL ADDER
Advertisements

Computer Organization and Architecture Tutorial 6 Kenneth Lee.
EE1A2 Microprocessor Systems & Digital Logic Part I Digital Electronic System Design Dr. T. Collins.
Binary Systems1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
COE 202: Digital Logic Design Signed Numbers
Arithmetic & Logic Unit Does the calculations Everything else in the computer is there to service this unit Handles integers May handle floating point.
Cpe 252: Computer Organization1 Lo’ai Tawalbeh Lecture #2 Standard combinational modules: decoders, encoders and Multiplexers 1/3/2005.
King Fahd University of Petroleum and Minerals
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Arithmetic CPSC 321 Computer Architecture Andreas Klappenecker.
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Assembly Language and Computer Architecture Using C++ and Java
Assembly Language and Computer Architecture Using C++ and Java
Arithmetic I CPSC 321 Andreas Klappenecker. Administrative Issues Office hours of TA Praveen Bhojwani: M 1:00pm-3:00pm.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
University College Cork IRELAND Number Systems, Data Types, Codes Logic Gates: An Introduction.
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Operations on data CHAPTER 4.
+ CS 325: CS Hardware and Software Organization and Architecture Exam 1: Study Guide.
Computer Organization & Programming Chapter2 Number Representation and Logic Operations.
1 Week 3: Data Representation: Negative Numbers READING: Chapter 3.
Computers Organization & Assembly Language
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Basic Arithmetic (adding and subtracting)
Logic and Digital System Design - CS 303
Computer Science 111 Fundamentals of Programming I Number Systems.
1 COMS 161 Introduction to Computing Title: Numeric Processing Date: October 29, 2004 Lecture Number: 26.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
Basic Arithmetic (adding and subtracting)
Calculating Two’s Complement. The two's complement of a binary number is defined as the value obtained by subtracting the number from a large power of.
Representation of Data Ma King Man. Reference Text Book: Volume 2 Notes: Chapter 19.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
Engineering 1040: Mechanisms & Electric Circuits Spring 2014 Number Systems.
CPU Internal memory I/O interface circuit System bus
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
Cosc 2150: Computer Organization Chapter 2 Part 1 Integers addition and subtraction.
Course contents Chapter 1 - section 1.6 Chapter 2 - all sections Chapter – 4.7, and 4.12 Chapter , Chapter 6 - all sections.
Number Representation
Digital Electronics and Computer Interfacing
Operations on Bits Arithmetic Operations Logic Operations
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
Data Representation in Computer Systems. 2 Signed Integer Representation The conversions we have so far presented have involved only positive numbers.
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
CPS3340 Computer Architecture Fall Semester, 2013
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
1. Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 2.
Number Systems and Computer Arithmetic Winter 2014 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
ELECTRICAL ENGINEERING: PRINCIPLES AND APPLICATIONS, Third Edition, by Allan R. Hambley, ©2005 Pearson Education, Inc. Chapter 7 Logic Circuits.
Computer Organization 1 Data Representation Negative Integers.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
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)
President UniversityErwin SitompulDigital Systems 7/1 Lecture 7 Digital Systems Dr.-Ing. Erwin Sitompul President University
Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 1.
Computer Hardware & Operation Northern College Diploma Philip Bird.
Software Design and Development Storing Data Computing Science.
1 Integer Representations V1.0 (22/10/2005). 2 Integer Representations  Unsigned integer  Signed integer  Sign and magnitude  Complements  One’s.
Arithmetic Circuits I. 2 Iterative Combinational Circuits Like a hierachy, except functional blocks per bit.
Binary Addition The simplest arithmetic operation in binary is addition. Adding two single-digit binary numbers is relatively simple, using a form of carrying:
Computer Architecture & Operations I
Computer Architecture & Operations I
Everything is a number Everything in a computer memory and on storages is a number. Number  Number Characters  Number by ASCII code Sounds  Number.
Negative Integers Unsigned binary representation can not be used to represent negative numbers. With paper and pencil arithmetic, a number is made negative.
Computer Architecture & Operations I
King Fahd University of Petroleum and Minerals
Digital Systems Design
Logic Circuits I Lecture 3.
Presentation transcript:

Digital Electronics and Computer Interfacing Tim Mewes 3. Digital Electronics

Digital Electronics and Computer Interfacing2 3.1 Digital Information Information is stored in two distinct physical states –Charge state of a capacitor (DRAM) –Magnetization direction (Hard disk, MRAM) –… The two states are referred to as –TRUE/FALSE (Boolean) –1/0 –On/Off –High/Low

Digital Electronics and Computer Interfacing3 3.1 Digital Information Information can be transmitted using: discrete Voltage levels –TTL: 1: 2.0 V or greater 0: 0.8 V or less –CMOS: 1: 3.7 V or greater 0: 1.3 V or less –… Light –typical wavelengths: 850, 1310, or 1550 nm Radio frequencies –Bluetooth 2.4GHz –…

Digital Electronics and Computer Interfacing4 3.2 Digital number representation Unsigned integers use base 2 (binary) representation: =1         2 0 = Each digit in the binary representation is called a bit Eight bits are called a byte The largest possible number that can be represented by n-bits is 2 n -1 (255 in case of a byte) The leftmost bit is also called most significant bit The rightmost bit is also called least significant bit

Digital Electronics and Computer Interfacing Unsigned integers How to convert from base 2 to base 10? Example: , n=8 bits Most significant bit 1  2 n-1 =1  2 7 =128   2 n-2 =1  2 6 =64  64 0  2 n-3 =0  2 5 =0  0 0  2 n-4 =0  2 4 =0  0 1  2 n-5 =1  2 3 =8  8 0  2 n-6 =0  2 2 =0  0 0  2 n-7 =0  2 1 =0  0 1  2 n-8 =1  2 0 =1  1 Sum: 201

Digital Electronics and Computer Interfacing Unsigned integers How to convert from base 10 to base 2? Example: 100 with n=8 bits Most significant bit 2 n-1 =2 7 =128 > 100  0 2 n-2 =2 6 =64 < 100  = 362 n-3 =2 5 =32 < 36  = 42 n-4 =2 4 =16 > 4  0 2 n-5 =2 3 =8 > 4  0 2 n-6 =2 2 =4 = 4  =02 n-7 =2 1 =2> 0  0 2 n-8 =2 0 =1> 0  =

Digital Electronics and Computer Interfacing Signed integers Sign-and-magnitude Use the most significant bit to represent the sign 0 represents ‘+’, 1 represents ‘-’ For n-bits numbers from -2 n-1 +1 to 2 n-1 -1 can be represented Advantage: similar to the way we usually indicate the sign of a number Disadvantage: arithmetic calculations tricky Zero has two representations: = =

Digital Electronics and Computer Interfacing Signed integers Ones’ complement Negative numbers are represented by complementing all the bits (1  0) of the binary representation of the magnitude of the number = = Zero still has two representations

Digital Electronics and Computer Interfacing Signed integers Two’s complement For negative numbers calculate the ones’ complement and add 1 to the result: = Ones’ complement: = Two’s complement: = Zero has only one representation Range for n bits: -2 n-1 to 2 n-1 -1 (-128 to +127 for a byte) Advantage: convenient for computer arithmetic

Digital Electronics and Computer Interfacing Comparison (4-Bit) Base 10Unsigned IntegerSign-and-magnitudeOnes’ complementTwo’s comlement

Digital Electronics and Computer Interfacing Gates A logic gate is an arrangement of switches to calculate operations using Boolean logic in digital circuits The output of a gate only depends on its inputs and not its history

Digital Electronics and Computer Interfacing Gates A Q A B Q A B Q

Digital Electronics and Computer Interfacing Gates A B Q A B Q A B Q

Digital Electronics and Computer Interfacing Boolean algebra associativity: commutativity: absorption: complements: distributivity: De Morgan’s theorem:

Digital Electronics and Computer Interfacing Boolean algebra How many gates do we really need? Just one: either NAND or NOR (universal gates)! One can build all other gates using for example only NAND: AND: NOT: OR: XOR: