Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes

Similar documents
CHW 261: Logic Design

BINARY SYSTEM. Binary system is used in digital systems because it is:

Korea University of Technology and Education

CHAPTER 2 (b) : AND CODES

Digital Fundamentals

Binary Addition. Add the binary numbers and and show the equivalent decimal addition.

Chapter 4 Section 2 Operations on Decimals

Digital Systems and Binary Numbers

Chapter 5: Computer Arithmetic. In this chapter you will learn about:

Learning Objectives. Binary over Decimal. In this chapter you will learn about:

Chapter 5: Computer Arithmetic

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

CS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq

COE 202: Digital Logic Design Number Systems Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Computer Organization

D I G I T A L C I R C U I T S E E

Logic Circuits I ECE 1411 Thursday 4:45pm-7:20pm. Nathan Pihlstrom.

CS & IT Conversions. Magnitude 10,000 1,

Chapter 1. Digital Systems and Binary Numbers

MYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes

Number Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:

Digital Fundamentals

Numbering systems. Dr Abu Arqoub

Digital Systems and Binary Numbers

Lecture (02) Operations on numbering systems

Moodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

COMPUTER ARITHMETIC (Part 1)

SE311: Design of Digital Systems

CO Computer Architecture and Programming Languages CAPL. Lecture 9

Lecture 2: Number Systems

Number Systems Base r

Digital Systems and Binary Numbers

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM

MC1601 Computer Organization

Logic and Computer Design Fundamentals. Chapter 1 Digital Computers and Information

Chapter 1 Review of Number Systems

DIGITAL SYSTEM DESIGN

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

Digital Fundamentals

Chapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc.

Accuplacer Arithmetic Study Guide

Objectives. Connecting with Computer Science 2

Binary Systems and Codes

UNIT 7A Data Representation: Numbers and Text. Digital Data

(+A) + ( B) + (A B) (B A) + (A B) ( A) + (+ B) (A B) + (B A) + (A B) (+ A) (+ B) + (A - B) (B A) + (A B) ( A) ( B) (A B) + (B A) + (A B)

carry in carry 1101 carry carry

Place Value. Verbal Form: 30,542 = Thirty thousand, five hundred forty-two. (Notice we don t use the word and.)

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR

Semester Transition Point. EE 109 Unit 11 Binary Arithmetic. Binary Arithmetic ARITHMETIC

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal

Internal Data Representation

Review of Number Systems

Lecture (03) Binary Codes Registers and Logic Gates

Digital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer.

Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction

5.OA Why Do We Need an Order of Operations?

Positional Number System

COMP Overview of Tutorial #2

Number Systems. Both numbers are positive

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

Introduction to Numbering Systems

Module 2: Computer Arithmetic

Lecture 8: Addition, Multiplication & Division

Organisasi Sistem Komputer

Binary Codes. Dr. Mudathir A. Fagiri

Grade 5. (Paper MCA, items)

Announcement. (CSC-3501) Lecture 3 (22 Jan 2008) Today, 1 st homework will be uploaded at our class website. Seung-Jong Park (Jay)

Properties and Definitions

UNIT - I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude

Data Representation and Binary Arithmetic. Lecture 2

Digital Arithmetic. Digital Arithmetic: Operations and Circuits Dr. Farahmand

The. Binary. Number System

Chap 1. Digital Computers and Information

Example 2: Simplify each of the following. Round your answer to the nearest hundredth. a

Chapter 2. Data Representation in Computer Systems

EE 109 Unit 6 Binary Arithmetic

CHAPTER 2 Data Representation in Computer Systems

Chapter (1) Eng. Mai Z. Alyazji

9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation

Data Representation in Digital Computers

CHAPTER 2 Data Representation in Computer Systems

Number System. Introduction. Decimal Numbers

Octal & Hexadecimal Number Systems. Digital Electronics

Digital Logic Circuits Volume I Digital Number Systems

Bachelor of Computer Application DIGITAL TECHNIQUES. Block-1

Divide: Paper & Pencil

MACHINE LEVEL REPRESENTATION OF DATA

Number representations

Chapter 2 Data Representations

Kinds Of Data CHAPTER 3 DATA REPRESENTATION. Numbers Are Different! Positional Number Systems. Text. Numbers. Other

Computer Organisation CS303

Learning Log Title: CHAPTER 3: ARITHMETIC PROPERTIES. Date: Lesson: Chapter 3: Arithmetic Properties

Chapter 2. Data Representation in Computer Systems

in this web service Cambridge University Press

2. MACHINE REPRESENTATION OF TYPICAL ARITHMETIC DATA FORMATS (NATURAL AND INTEGER NUMBERS).

Data Representations & Arithmetic Operations

Transcription:

Digital Fundamentals CHAPTER 2 Number Systems, Operations, and Codes

Decimal Numbers The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 The decimal numbering system has a base of 10 with each position weighted by a factor of 10: 2

Binary Numbers The binary number system has two digits: 0 and 1 The binary numbering system has a base of 2 with each position weighted by a factor of 2: 3

Decimal-to-Binary Conversion Sum-of-weights method Repeated division-by-2 method Conversion of decimal fractions to binary 4

Binary Arithmetic Binary addition Binary subtraction Binary multiplication Binary division 5

Complements of Binary Numbers 1 s complements 2 s complements 6

Complements of Binary Numbers 1 s complement 7

Complements of Binary Numbers 2 s complement 8

Signed Numbers Signed-magnitude form 1 s and 2 s complement form Decimal value of signed numbers Range of values Floating-point numbers 9

Signed-magnitude form The sign bit is the left-most bit in a signed binary number A 0 sign bit indicates a positive magnitude A 1 sign bit indicates a negative magnitude 10

Complement Form 1 s complement form A negative value is the 1 s complement of the corresponding positive value 2 s complement form A negative value is the 2 s complement of the corresponding positive value 11

Decimal Value of Signed Numbers Sign-magnitude 1 s complement 2 s complement 12

Range of Values 2 s complement form: (2 n 1 ) to + (2 n 1 1) 13

Floating-Point Numbers Single-precision (32 bits) Double-precision (64 bits) Extended-precision (80 bits) 14

Arithmetic Operations with Signed Numbers Addition Subtraction Multiplication Division 15

Addition of Signed Numbers 1 The parts of an addition function are: Addend Augend Sum Numbers are always added two at a time. 16

Addition of Signed Numbers 2 Four conditions for adding numbers: Both numbers are positive. A positive number that is larger than a negative number. A negative number that is larger than a positive number. Both numbers are negative. 17

Signs for Addition 1 When both numbers are positive, the sum is positive. When the larger number is positive and the smaller is negative, the sum is positive. The carry is discarded. 18

Signs for Addition 2 When the larger number is negative and the smaller is positive, the sum is negative (2 s complement form). When both numbers are negative, the sum is negative (2 s complement form). The carry bit is discarded. 19

Subtraction of Signed Numbers The parts of a subtraction function are: Subtrahend Minuend Difference Subtraction is addition with the sign of the subtrahend changed. 20

Subtraction The sign of a positive or negative binary number is changed by taking its 2 s complement To subtract two signed numbers, take the 2 s complement of the subtrahend and add. Discard any final carry bit. 21

Multiplication of Signed Numbers 1 The parts of a multiplication function are: Multiplicand Multiplier Product Multiplication is equivalent to adding a number to itself a number of times equal to the multiplier. 22

Multiplication of Signed Numbers 2 There are two methods for multiplication: Direct addition Partial products The method of partial products is the most commonly used. 23

Multiplication of Signed Numbers 3 If the signs are the same, the product is positive. If the signs are different, the product is negative. 24

Division of Signed Numbers 1 The parts of a division operation are: Dividend Divisor Quotient Division is equivalent to subtracting the divisor from the dividend a number of times equal to the quotient. 25

Division of Signed Numbers 2 If the signs are the same, the quotient is positive. If the signs are different, the quotient is negative. 26

Hexadecimal Numbers 1 Decimal, binary, and hexadecimal numbers 27

Hexadecimal Numbers 2 Binary-to-hexadecimal conversion Hexadecimal-to-decimal conversion Decimal-to-hexadecimal conversion 28

Binary-to-Hexadecimal Conversion Break the binary number into 4-bit groups Replace each group with the hexadecimal equivalent 29

Hexadecimal-to-Decimal Conversion Convert the hexadecimal to groups of 4- bit binary Hexadecimal-to-decimal conversion Convert the binary to decimal 30

Decimal-to-Hexadecimal Conversion Repeated division by 16 31

Binary Coded Decimal (BCD) 32

Digital Codes Gray code ASCII code 33

Gray Code 34

ASCII Code (Control Characters) 35

ASCII Code (graphic symbols 20h 3Fh) 36

ASCII Code (graphic symbols 40h 5Fh) 37

ASCII Code (graphic symbols 60h 7Fh) 38

Extended ASCII Code (80h FFh) Non-English alphabetic characters Currency symbols Greek letters Math symbols Drawing characters Bar graphing characters Shading characters 39

Error Detection and Correction Codes Parity error codes Hamming error codes 40

Parity Error Codes 41

Hamming Error Codes Hamming code words Hex equivalent of the data bits 0000000 0000111 0011011 0011110 0101010 0101101 0110011 0110100 1001011 1001100 1010010 1010101 1100001 1100110 1111000 1111111 0 1 2 3 4 5 6 7 8 9 A B C D E F 42