Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.

Slides:



Advertisements
Similar presentations
DATA REPRESENTATION CONVERSION.
Advertisements

Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
Number Systems & Operations
Chapter 2 : Number System
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Number Systems and Arithmetic
© Copyright 2000 Indiana University Board of Trustees Proficiency Quiz Study Guide Note: The following slides are provided courtesy of Dr. Bob Orr (Computer.
Binary Numbers.
Data Representation in Computers. Data Representation in Computers/Session 3 / 2 of 33 Number systems  The additive approach – Number earlier consisted.
Number Systems and Codes
Simple Data Type Representation and conversion of numbers
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Numbering systems.
Numeral Systems Subjects: Numeral System Positional systems Decimal
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Numbering Systems CS208.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
1-1 Lecture 1 Class Overview and Appendix A -- Number Systems.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
Number systems, Operations, and Codes
Numbering System Base Conversion. Number systems Decimal – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Binary – 0, 1 Octal – 0, 1, 2, 3, 4, 5, 6, 7 Hexadecimal system.
Positional Notation 642 in base 10 positional notation is:
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
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,
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.
Introduction To Number Systems Binary System M. AL-Towaileb1.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
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.
Number Systems and Binary Arithmetic Quantitative Analysis II Professor Bob Orr.
Computer Math CPS120 Introduction to Computer Science Lecture 7.
Chapter 5 NUMBER REPRESENTATION AND ARITHMETIC CIRCUITS.
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.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Unit 1 Introduction Number Systems and Conversion.
Introduction To Number Systems
Digital Design Chapter One Digital Systems and Binary Numbers
Numbering Systems.
Octal to Decimal Decimal Octal Binary Hexadecimal.
Number Systems and Binary Arithmetic
Integer Real Numbers Character Boolean Memory Address CPU Data Types
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
COMPUTING FUNDAMENTALS
Location in course textbook
Chapter 3 Data Representation
Number System conversions
Number Systems.
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Chapter 1 Number Systems & Conversions
Number Systems and Binary Arithmetic
Numbering System TODAY AND TOMORROW 11th Edition
Numbering Systems and Arithmetic operations on Hex, binary, and octal
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Electronics and Microprocessors
Chapter 2: Number Systems
BASIC MATH.
Binary to Decimal Conversion
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Information Representation
Introduction To Number Systems
COE 202: Digital Logic Design Number Systems Part 2
1. Number Systems Chapt. 2.
Presentation transcript:

Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT

Apply appropriate method to solve arithmetic problem in numbering system and sequential logic circuit Course Information Outline

 Define decimal, binary, octal, and hexadecimal number  Perform arithmetic operation(addition and subtraction) on different number bases.  Convert decimal, binary, octal, and hexadecimal numbers to different bases and vice-versa. By the end of topic, the students should know:

 Numbering System refers to the methods used internally to represent information stored in a computer.  Computers store lots of different types of information:  numbers  text  graphics of many varieties (stills, video, animation)  sound Numbering System

 ALL types of information stored in a computer are stored internally in the same simple format: a sequence of 0's and 1's. Numbering System Representing Real Data in the Computer

Numbering System

DEFINE DECIMAL, OCTAL, HEXADECIMAL AND BINARY NUMBER

 Composed of 10 symbols or numerals(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)  Base 10  It is positional-value system : value of digits depends on its position  Example : 453₁₀ DATA REPRESENTATION IN COMPUTER MEMORY DECIMAL NUMBER/ BASE carries the most weight refer MOST SIGNIFICANT DIGIT (MSD) 3 carries the most weight refer LEAST SIGNIFICANT DIGIT(LSD)

 Example : 27.35₁₀ = (2 X 10 )+ (7 X 1 )+ (3 X 0.1 )+ (5 X 0.01) = = 2 X X X X X 10 DATA REPRESENTATION IN COMPUTER MEMORY DECIMAL NUMBER/ BASE

 Composed of 8 symbols or numerals(0, 1, 2, 3, 4, 5, 6, 7)  Base 8  Example : / ₈ DATA REPRESENTATION IN COMPUTER MEMORY OCTAL NUMBER/ BASE

 Composed of 16 symbols or numerals (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F )  Symbol alphabets represent A = 10, B = 11, C = 12, D = 13, E = 14, F = 15  Example : 7A₁₆ DATA REPRESENTATION IN COMPUTER MEMORY HEXADECIMAL NUMBER/ BASE 16

 Digits are 0 or 1  Binary numbers are in base 2  Example : 101₂ DATA REPRESENTATION IN COMPUTER MEMORY BINARY NUMBER/ BASE 2

PERFORM ARITHMETIC OPERATION IN DIFFERENT NUMBER BASES (ADDITION AND SUBSTRACTION)

 Add two octal digits as usual  If the sum less is 7 or less, it can be expressed as octal digit  If the sum is greater than or equal 8, subtract 8 and carry a 1 to the next digit position OCTAL (ADDITION)

 When minuend value is smaller than the subtrahend, borrow 8 value from the column before OCTAL (SUBTRACTION)

OCTAL (SUBSTRACTION)

 Add the following numbers  Subtract the following numbers EXERCISE

ANSWER i ii.343 8

 Add two hex digits as usual  If the sum less is 15 or less, it can be expressed as hex digit  If the sum is greater than or equal 16, subtract 16 and carry a 1 to the next digit position HEXADECIMAL (ADDITION)

 When minuend value is smaller than the subtrahend, borrow 16 value from the column before HEXADECIMAL (SUBTRACTION)

 Add the following numbers  Subtract the following numbers EXERCISE

Answer

 Only four cases can occur in adding the two binary digits (bits) in any position: BINARY ( ADDITION) CARRY

BINARY ( ADDITION)

 When minuend value is smaller than the subtrahend, borrow 2 value from the column before BINARY ( SUBTRACTION) borrow

BINARY ( SUBTRACTION)

 Add the following numbers i ii iii i – 111 ii EXERCISE

CONVERSIONS

1.Set up the problem. For this example, let's convert the decimal number to binary. 2. Write the integer answer (quotient) under the long division symbol, and write the remainder (0 or 1) to the right of the dividend. DECIMAL  BINARY

3. Continue downwards, dividing each new quotient by two and writing the remainders to the right of each dividend. Stop when the quotient is Starting with the bottom remainder, read the sequence of remainders upwards to the top. DECIMAL  BINARY Answer:

BINARY  DECIMAL EXAMPLE 1 EXAMPLE 2

Example: Convert to octal DECIMAL  OCTAL Answer : ₈

 Converted to decimal equivalent by multiplying each octal digit by its positional weight OCTAL  DECIMAL EXAMPLE 1

 Using repeated division by 16.  Example : convert 423 to hexadecimal DECIMAL  HEXADECIMAL remainder remainder remainder 1 Answer : 1A7 ₁₆

 Convert each octal digit to its 3 bits binary  Example : Convert 472₈ to binary OCTAL  BINARY Octal Digit Binary Equivalent

 Converted to its decimal equivalent by using the fact that each hex digit position has weight that is power of 16.  Example : convert 14₁₆ to decimal HEXADECIMAL  DECIMAL

 The bits of the binary number are grouped into groups of 3 bits.  Example : Convert ₂ into octal BINARY  OCTAL

 The number is grouped into groups of 4 bits  Example : Convert ₂ to hex BINARY  HEXADECIMAL A6

 Each hex digit converted to its 4 bit binary  Example : 9F2₁₆ to binary HEXADECIMAL  BINARY 9F