Digital Systems and Binary Numbers

Slides:



Advertisements
Similar presentations
Addition and Subtraction. Outline Arithmetic Operations (Section 1.2) – Addition – Subtraction – Multiplication Complements (Section 1.5) – 1’s complement.
Advertisements

Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
Binary Systems1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Chapter 1 Binary Systems 1-1. Digital Systems
CSCI 232© 2005 JW Ryder1 Bases  = (3 * 10 2 ) + (2 * 10 1 ) + (4 * 10 0 )  = (3 * 8 2 ) + (2 * 8 1 ) + (4 * 8 0 )  = (1 * 2 3 )
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Data Representation – Chapter 3 Sections 3-2, 3-3, 3-4.
Mantıksal Tasarım – BBM231 M. Önder Efe
1.6 Signed Binary Numbers.
Dr. Bernard Chen Ph.D. University of Central Arkansas
Digital Systems and Binary Numbers
Logic and Digital System Design - CS 303
CS220 : Digital Design.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
Number systems & Binary codes MODULE 1 Digital Logic Design Ch1-2 Outline of Chapter 1  1.1 Digital Systems  1.2 Binary Numbers  1.3 Number-base Conversions.
CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Chapter 3 Complements Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
AEEE2031 Data Representation and Numbering Systems.
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
Signed Binary Numbers Arithmetic Subtraction – In 2’s-complement form: Example: 1.Take the 2’s complement of the subtrahend (including the sign bit) and.
Chapter 1 Digital Systems and Binary Numbers
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
Chapter 1: Binary Systems
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
1 CS 151 : Digital Design Chapter 4: Arithmetic Functions and Circuits 4-3 : Binary Subtraction.
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
Digital Logic Design Lab 1,2 By Nora Alaqeel.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
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)
Digital Logic Design Ch1-1 Chapter 1 Digital Systems and Binary Numbers Mustafa Kemal Uyguroğlu Digital Logic Design I.
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.
N 3-1 Data Types  Binary information is stored in memory or processor registers  Registers contain either data or control information l Data are numbers.
Lecture 4: Digital Systems & Binary Numbers (4)
CPE 201 Digital Design Lecture 3: Digital Systems & Binary Numbers (3)
Chapter 1 Digital Systems and Binary Numbers
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Chap 3. Combinational Logic Design
CHAPTER 1 : INTRODUCTION
Binary Arithmetic Binary arithmetic is essential in all digital computers and in many other types of digital systems. Addition, Subtraction, Multiplication,
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
University of Gujrat Department of Computer Science
Wakerly Section 2.4 and further
Chapter 1 Number Systems, Number Representations, and Codes
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
CS 105T Digital Logic Design
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Data Representation Data Types Complements Fixed Point Representation
Digital Electronics & Logic Design
CS 105T Digital Logic Design
COMPLEMENTS Complements are used in digital computers for simplifying the subtraction operations and for logical manipulation. There are two types of complements.
EE207: Digital Systems I, Semester I 2003/2004
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Data Representation – Chapter 3
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Systems and Binary Numbers
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
CPS120: Introduction to Computer Science
Number Systems Rayat Shikshan Sanstha’s
Number Systems Rayat Shikshan Sanstha’s
ECE 331 – Digital System Design
Arithmetic Operation By: Asst Lec. Besma Nazar Nadhem
Chapter 1 (Part c) Digital Systems and Binary Numbers
Presentation transcript:

Digital Systems and Binary Numbers Mano & Ciletti Chapter 1 By Suleyman TOSUN Ankara University

Outline Digital Systems Binary Numbers Number-Base Conversions Octal and Hexadecimal Numbers Complements Signed Binary Numbers Binary Codes Binary Storage and Registers Binary Logic

Digital Systems

Binary Numbers

Number-Base Conversions

Complements Simplifies Two types exist the subtraction operation Logical operations Two types exist The radix complement (r’s complement) 10’s complement, 2’s complement The diminished radix complement ((r-1)’s complement) 9’s complement, 1’s complement

Diminished Radix (r-1) complement Given a number N in base r having n digits: (r-1)’s complement of N is (rn-1)-N When r=10, (r-1)’s complement is called 9’s complement. 10n-1 is a number represented by n 9’s. 9’s complement of 546700 is (n=6) 999999-546700=453299 9’s complement of 012398 is (n=6) 999999-012398=987601

1’s complement For binary numbers, r=2 and r-1=1. 1’s complement of N is (2n-1)-N If n=4, 2n=10000. So, 2n-1=1111. To determine the 1’s complement of a number, subtract each digit from 1. Or, bit flip!!! Replace 0’s with 1’s, 1’s with 0’s!!! Example: If N= 1011000, 1’s comp.= 0100111 If N= 010110, 1’s comp.= 101001

Radix (r’s) complement Given a number N in base r having n digits: r’s complement of N is rn-N When r=10, r’s complement is called 10’s complement. 10’s complement of 546700 is (n=6) 1000000-546700=453300 10’s complement of 012398 is (n=6) 1000000-012398=987602

2’s complement For binary numbers, r=2, 2’s complement of N is 2n-N To determine the 2’s complement of a number, determine 1’s complement and add 1 to it. Example: If N= 1011001, 1’s comp.= 0100110, 2’s comp.=0100111 If N= 1101100, 2’s comp.= 10010100 Another way of finding 2’s comp.: Leave all least significant 0’s and the first 1 unchanged, bit flip the remaning digits.

Subtraction with Complements Minuend: 101101 Subtrahend: 100111 Difference: 000110 Add the minuend M to r’s complement of the subtrahend N. M + (rn-N) = M - N+rn If M>=N, the sum will produce an end carry. Discard it and what is left is the result M-N. If M<N, the sum does not produce an end carry and is equal to rn-(N-M) . To obtain the answer in a familiar form, take the r’s complement of the sum and place a negative sign in front.

Example

Example

Example

Signed Binary Numbers Negative numbers is shown with a minus sign in math. In digital systems, the first bit decides the sign of the number. If the first bit 0, the number is positive. If the first bit 1, the number is negative. This is called signed magnitude convention.

Signed complement systems To represent negative number, 1’s complement and 2’s complements are also used.

Example Represent +9 and -9 in eight bit system +9 is same for all systems: 00001001 -9

To determine negative number In signed magnitute: In positive number, change the most significant bit to 1 One’s complement: Take the one’s complement of the positive number. Two’s complement: Take the two’s complement of the positive number. (Or add 1 to one’s complement)

Arithmetic Addition

Aritmetic subtraction Take the 2’s complement of subtrahend. Add it to the minuend. Discard caryy if there is any. Examples: 10-5 (8 bits), -3-5, 18-(-9)

Binary Codes – BCD Codes n bit can code upto 2n combinations.

BCD Addition

Example

Other Decimal Codes

Gray Codes Only one bit changes when going from one number to the next. How to determine the gray code equivalent of a number: Add 0 to the left of number. XOR every two neigboring pair in order. The result is the gray code. Example: 1 1 0 0 0 0 -> 0 1 1 0 0 0 0 1 0 1 0 0 0

Error Detecting Codes Add an extra bit (parity bit) to make the total number of one’s either even or odd.

Binary logic

Truth tables

Gate sysbols

Timing diagrams

More than two inputs