Number Systems Digital Logic By: Safwan Mawlood

Slides:



Advertisements
Similar presentations
Principles & Applications
Advertisements

Monika Gope Lecturer IICT, KUET
Digital Systems Introduction Binary Quantities and Variables
Nat 4/5 Computing Science Lesson 1: Binary
Binary Lesson 3 Hexadecimal. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Binary Lesson 3 Hexadecimal. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Digital Logic & Design Lecture No. 3. Number System Conversion Conversion between binary and octal can be carried out by inspection.  Each octal digit.
Data Storage and manipulation. Data Storage Computers store and manipulate data in the form of electronic pulses (high and Low voltages). This digitised.
NUMBER SYSTEMS The BASE of a number system Determines the number of digits available In our number system we use 10 digits: 0-9 The base in our system.
Binary, Hexadecimal, and Base 10.
Number Systems Decimal Binary Denary Octal Hexadecimal Click the mouse or Press the space bar to Continue.
Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
CIS 020 Assembly Programming Chapter 02 - Numbering Systems & Data Representation © John Urrutia 2012, All Rights Reserved.5/27/20121.
CHAPTER 2 Number Systems, Operations, and Codes
Digital Fundamentals Floyd Chapter 2 Tenth Edition
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Overview Digital Systems, Computers, and Beyond
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Number Systems and Arithmetic
Information Representation and Number Systems BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Binary Numbers.
1.6 Signed Binary Numbers.
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
© GCSE Computing Candidates should be able to:  convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa  add two 8-bit.
Number Systems and Codes
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Numbering Systems CS208.
Chapter 3 Data Representation
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Data Representation Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
1 EENG 2710 Chapter 1 Number Systems and Codes. 2 Chapter 1 Homework 1.1c, 1.2c, 1.3c, 1.4e, 1.5e, 1.6c, 1.7e, 1.8a, 1.9a, 1.10b, 1.13a, 1.19.
Number systems, Operations, and Codes
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
D ATA REPRESENTATION, BINARY SYSTEM, B IT, B YTE, ASCII C ODE Chapter 4 Lecturer In Charge: Manesh T 1.
Computer Math CPS120 Introduction to Computer Science Lecture 4.
AEEE2031 Data Representation and Numbering Systems.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Number Systems by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
1 CHAPTER 1 DIGITAL SYSTEMS AND BINARY NUMBERS 2 O UTLINE OF C HAPTER Digital Systems 1.2 Binary Numbers 1.3 Number-base Conversions 1.4 Octal.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
D IGITAL C IRCUITS Book Title: Digital Design Edition: Fourth Author: M. Morris Mano 1.
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
CHAPTER 3 BINARY NUMBER SYSTEM. Computers are electronic machines which operate using binary logic. These devices use two different values to represent.
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.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
Programmable Logic Controller
Some basic concepts underlying computer archi­tecture
Digital Design Chapter One Digital Systems and Binary Numbers
Number Systems and Binary Arithmetic
CHAPTER 1 : INTRODUCTION
Chapter 3 Data Representation
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
Numbering System TODAY AND TOMORROW 11th Edition
Digital Electronics and Microprocessors
Chapter Four Data Representation in Computers By Bezawit E.
COMS 161 Introduction to Computing
CHAPTER 69 NUMBER SYSTEMS AND CODES
Presentation transcript:

Number Systems Digital Logic By: Safwan Mawlood Digital Principles and Logic Design, A.Saha &N.Manna

Number Systems Knowing what base someone refers to Decimal uses 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Binary uses 2 digits: 0 and 1. Octal number system there are 8 digits—0, 1, 2, 3, 4, 5, 6, and 7. Hexadecimal number system has 16 digits—0 to 9— and the rest of the six digits are specifies by letter symbols as A,B, C, D, E, and F. Here A, B, C, D, E, and F represent decimal 10, 11, 12, 13, 14, and 15 respectively.

Base 10 Numbers

Base 2 (Binary) Numbers

Hexadecimal 1 2 3 4 5 6 7 8 9 A B C D E F The base 16, or hexadecimal (hex), number system is used frequently when working with computers, because it can be used to represent binary numbers in a more readable form.

CONVERSION BETWEEN NUMBER SYSTEMS It is often required to convert a number in a particular number system to any other number system, e.g., it may be required to convert a decimal number to binary or octal or hexadecimal.

Converting Decimal to Binary To convert a number in decimal to a number in binary we have to divide the decimal number by 2 repeatedly, until the quotient of zero is obtained.

Converting Decimal to Binary Start by dividing the decimal by the largest number in the Value row that will go.

Decimal to Octal Conversion Similarly, to convert a number in decimal to a number in octal we have to divide the decimal number by 8 repeatedly, until the quotient of zero is obtained.

Decimal-to-hexadecimal Conversion The same steps are repeated to convert a number in decimal to a number in hexadecimal. Only here we have to divide the decimal number by 16 repeatedly, until the quotient of zero is obtained.

Binary-to-decimal Conversion 27 26 25 24 23 22 21 20 128 64 32 16 8 4 2 1

Converting 8-Bit Binary to Decimal Binary numbers are converted to decimal numbers by multiplying the binary digits by the base number of the system, which is base 2, and raised to the exponent of its position.

Octal-to-Decimal Conversion Ex. Convert 34628 into decimal number. Sol. The octal number given is 3462

Hexadecimal-to-decimal Conversion Ex. Convert 42AD 16 to decimal

Fractional Conversion Example: Convert 1010.011 into decimal number

Octal-to-decimal Conversion Example: Convert 362.358 into a decimal number.

Hexadecimal to Decimal number Example: 42A.1216

-decimal-to-binary Conversion Example: 25.62510

Convert Decimal to octal number Convert 34.52510 into an octal number.

Binary Arithmetic Binary Addition

Example: Add 10102 and 11012 Example: Add 01102 and 11112

Binary Subtraction

Example: Subtract10012 and 10002

Binary Multiplication

Example: Multiply the following binary numbers 01112 and 11012

Example: Multiply the following binary numbers 1.0112 and 10.012

Binary Division

Example: Divide the following binary numbers 11001 and 101

1’s Complement The ones' complement of a binary number is defined as the value obtained by inverting all the bits in the binary representation of the number (swapping 0's for 1's and vice-versa). 

Subtraction Using 2’s Complement Binary subtraction can be performed by adding the 2’s complement of the subtrahend to the minuend. If a carry is generated, discard the carry. Now if the subtrahend is larger than the minuend, then no carry is generated

Integer Signed Unsigned 2’s Complement 5 0000 0101 4 0000 0100 3 0000 0011 2 0000 0010 1 0000 0001 0000 0000 -1 255 1111 1111 -2 254 1111 1110 -3 253 1111 1101 -4 252 1111 1100 -5 251 1111 1011 -35 100011 011100 + 1 ----------------- 011101

Code Computers and other digital circuits process data in binary format. Various binary codes are used to represent data which may be numeric, alphabetic or special characters. Codes are also used for error detection and error correction in digital systems.

Gray Gray code belongs to a class of code known as minimum change code, in which a number changes by only one bit as it proceeds from one number to the next.

Conversion of a Binary Number into Gray Code (101011)2 change to Gray

Conversion of Gray Code into a Binary Number

Binary Code Decimal BCD, is a method of using binary digits to represent the decimal digits 0 through 9. A decimal digit is represented by four binary digits, or four bits are required to code each decimal number. as shown below:

You must realize that BCD and binary are not the same You must realize that BCD and binary are not the same. For example, 4910 in binary is 1100012, but 4910 in BCD is 0100 1001BCD. Each decimal digit is converted to its binary equivalent.

BCD Conversion For example, let's go through the conversion of 26410 to BCD. We'll use the block format that you used in earlier conversions. First, write out the decimal number to be converted; then, below each digit write the BCD equivalent of that digit: