EE1A2 Microprocessor Systems & Digital Logic Part I Digital Electronic System Design Dr. T. Collins.

Slides:



Advertisements
Similar presentations
Intro to CS – Honors I Representing Numbers GEORGIOS PORTOKALIDIS
Advertisements

EET 1131 Unit 7 Arithmetic Operations and Circuits
Number Bases Informatics INFO I101 February 9, 2004 John C. Paolillo, Instructor.
Representing Numbers: Integers
Arithmetic Operations and Circuits
Parallel Adder Recap To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition. The.
EE1A Revision What should you be expected to do in a typical exam question ? Understanding of basic principles. Ability to perform simple circuit analysis.
King Fahd University of Petroleum and Minerals
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Assembly Language and Computer Architecture Using C++ and Java
CSC 110 – Intro to Computing Lecture 14: Midterm Review.
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
IT Systems Number Operations EN230-1 Justin Champion C208 –
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Computer Systems 1 Fundamentals of Computing
Number Systems Lecture 02.
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
Dr. Bernard Chen Ph.D. University of Central Arkansas
ECE 2110: Introduction to Digital Systems Signed Number Conversions.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
Number Systems Binary and Hexadecimal. Base 2 a.k.a. Binary  Binary works off of base of 2 instead of a base 10 like what we are taught in school 
Numeral Systems Subjects: Numeral System Positional systems Decimal
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)
Dale & Lewis Chapter 3 Data Representation. Data and computers Everything inside a computer is stored as patterns of 0s and 1s Numbers, text, audio, video,
Computer Fundamentals ELEC 330 Digital Systems Engineering Dr. Ron Hayne.
Digital Electronics and Computer Interfacing Tim Mewes 3. Digital Electronics.
Digital Arithmetic and Arithmetic Circuits
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
CSE 241 Computer Organization Lecture # 9 Ch. 4 Computer Arithmetic Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
Basic Arithmetic (adding and subtracting)
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
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.
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
CPU Internal memory I/O interface circuit System bus
Number Representation. Representing numbers n Numbers are represented as successive powers of a base, or radix.
1 IT 231, CMPE 331 Digital Logic Design Week 2 Number systems and arithmetic.
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
Operations on Bits Arithmetic Operations Logic Operations
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
CSNB374: Microprocessor Systems Chapter 1: Introduction to Microprocessor.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Basic Electricity and Electronics Module Two Basic Electronics Copyright © Texas Education Agency, All rights reserved.
AEEE2031 Data Representation and Numbering Systems.
Combinational Circuits
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
Number Systems by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
NUMBER SYSTEMS.
Addition, Subtraction, Logic Operations and ALU Design
Unit - 3 NUMBER SYSTEM AND CODES
Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages.
2's Complement Arithmetic
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
Introduction to Digital Electronics Lecture 2: Number Systems.
Number Representation (Part 2) Computer Architecture (Fall 2006)
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Basic Electricity and Electronics Module Two Basic Electronics Copyright © Texas Education Agency, All rights reserved.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Arithmetic Circuits I. 2 Iterative Combinational Circuits Like a hierachy, except functional blocks per bit.
Chapter 6. Digital Arithmetic: Operations and Circuits
2's Complement Arithmetic
Digital Arithmetic Wen-Hung Liao, Ph.D..
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Principles & Applications
King Fahd University of Petroleum and Minerals
Presentation transcript:

EE1A2 Microprocessor Systems & Digital Logic Part I Digital Electronic System Design Dr. T. Collins

Content Binary Arithmetic Addition and subtraction. Arithmetic circuits. Arithmetic Logic Units Micro-Controllers Micro-controller architecture. Essential building blocks of a computer. Programming…

Binary Arithmetic Number Systems Decimal Binary Hexadecimal Addition Long addition Full adder circuits Parallel adders Carry-look-ahead circuitry Subtraction Two’s complement Subtraction using a parallel adder

Arithmetic Logic Units Adder-Subtraction Circuit Combining addition and subtraction in a single controllable circuit Arithmetic Logic Units General-purpose arithmetic and logic ‘calculation’ units Registers How memory circuits can simplify the connections to an ALU

The Anatomy of a Micro-Controller Tri-State Ports and Busses How a ‘bus’ can interconnect many different registers without huge wiring difficulties. Connecting an ALU to a Bus The Building Blocks of a Computer ALU Registers I/O Ports Program Memory Programs

Number Systems – Decimal Base 10 Ten digits, 0-9 Columns represent (from right to left) units, tens, hundreds etc    10 0 or 1 hundred, 2 tens and 3 units

Bases When counting upwards in base-10, we increase the units digit until we get to 10 when we reset the units to zero and increase the tens digit. So, in base-n, we increase the units until we get to n when we reset the units to zero and increase the n-s digit. Consider hours-minutes-seconds as an example of a base-60 number system: Eg. 12:58: :03:20 = 13:02:03 NB. The base of a number is often indicated by a subscript. E.g. (123) 10 indicates the base-10 number 123.

Binary Base 2 Two digits, 0 & 1 Columns represent (from right to left) units, twos, fours, eights etc        2 0 = 1        1 = 123

Binary Numbers Terminology Each digit in a binary number is known as a “bit”. A group of eight bits makes a binary number known as a “byte”. A group of more than eight bits is known as a “word”. Typical word lengths – 12, 16, 32, 64.

Decimal to Binary Conversion 123  2=61remainder 1 61  2=30remainder 1 30  2= 15 remainder 0 15  2= 7remainder 1 7  2= 3remainder 1 3  2= 1remainder 1 1  2= 0remainder 1 Least significant bit (rightmost) Most significant bit (leftmost) Answer : (123) 10 = ( ) 2 Example – Converting (123) 10 into binary

Two’s Complement One byte (eight bits) can be used to represent the decimal number range 0 to 255 (unsigned) -128 to 127 (signed) Negative binary numbers are formed by subtracting from a number one greater than the maximum possible (i.e. 2 n or 256 for a byte) For example, (123) 10 = ( ) 2 (-123) 10 = ( ) 2 = (133) 10 = ( ) 10

Frequently Asked Question So how can you tell the difference between: (-123) 10 = ( ) 2 and (133) 10 = ( ) 2 You can’t unless you know whether you’re using signed or unsigned arithmetic:

Hexadecimal Base 16 Sixteen digits, 0-9 and A-F (ten to fifteen) Columns represent (from right to left) units, 16s, 256s, 4096s etc. 7B 7   16 0 = 123

Decimal to Hex Conversion 123  16=7remainder 11 (or B) 7  16=0remainder 7 Answer : (123) 10 = (7B) 16 Converting (123) 10 into hex

Binary to Hex / Hex to Binary Even very long numbers can be converted easily, treating each hex digit independently B B 9 6 F A E.g. Each group of four binary bits maps on to a single hex digit.

Binary Arithmetic - Addition Binary long addition works just like decimal long addition Carried digits Result

Full Adder Each column of the sum has three inputs Digits from the two numbers to add (A and B) Carry bit from previous column It also has two outputs Result bit Carry bit to next column These are the logical operations performed by a full adder circuit. Full Adder B A C IN C OUT SUM

Parallel Adder To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition.

Summary In digital electronics, numbers are represented using base-2 (binary). Base-16 (hex) is often used by human programmers as binary to hex conversion is very easy. Binary numbers may be unsigned or signed (two’s complement). Binary addition works in a similar way to decimal long addition. Almost all of this should be just revision… … if not, make full use of the tutorial.