Chapter 2: Number Systems

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

DATA REPRESENTATION CONVERSION.
James Tam Beyond base 10: Non-decimal based number system What exactly is decimal? How do other number systems work (binary, octal and hex) How to convert.
Number Systems. 2 The total number of allowable symbols in a number system is called the radix or base of the system. Decimal Numbers: radix = 10 (symbols:
ECE 301 – Digital Electronics Course Introduction, Number Systems, Conversion between Bases, and Basic Binary Arithmetic (Lecture #1)
1 Number Systems. 2 Numbers Each number system is associated with a base or radix – The decimal number system is said to be of base or radix 10 A number.
Converting Binary to Octal
Number Systems and Arithmetic
 Binary Binary  Binary Number System Binary Number System  Binary to Decimal Binary to Decimal  Decimal to Binary Decimal to Binary  Octal and Hexadecimal.
Chapter 1 1 Number Systems. 2 Objectives  Understand why computers use binary (Base-2) numbering.  Understand how to convert Base-2 numbers to Base-
Number Systems.
1 Survey of Computer Science CSCI 110, Spring 2011 Lecture 16 Digital Circuits, binary Numbers.
Numbering systems.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Numbering Systems CS208.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Conversion of Number System Conversion Among Bases The possibilities: Hexadecimal DecimalOctal Binary
1 CS103 Guest Lecture Number Systems & Conversion Bitwise Logic Operations.
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
Number systems, Operations, and Codes
Digital Logic Lecture 2 Number Systems
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
Number Base Conversions
Number System sneha.
Octal to Decimal Hexadecimal DecimalOctal Binary.
Positional Number Systems Decimal, Binary, Octal and Hexadecimal Numbers Wakerly Section
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Chapter 2 Number Systems Consists of a set of symbols called digits and a set of relations such as +, -, x, /.
Computer Number System
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.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
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.
Dr. Nermin Hamza 1. Materials Book: Digital Design 4 th M. Morris Mano and Michael D. Ciletti 2.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
CPE 201 Digital Design Lecture 2: Digital Systems & Binary Numbers (2)
Chapter 2 Binary Number Systems.
Introduction To Number Systems
Positional Number Systems Decimal, Binary, Octal and Hexadecimal Numbers Wakerly Section
Digital Design Chapter One Digital Systems and Binary Numbers
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
Number Systems.
Writer:-Rashedul Hasan. Editor:- Jasim Uddin
CSE 102 Introduction to Computer Engineering
Tools of Web Development 1: Module A: Numbering Systems
Number System conversions
Fundamentals & Ethics of Information Systems IS 201
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Chapter 1 Number Systems & Conversions
Number Systems and Binary Arithmetic
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
Numbering System TODAY AND TOMORROW 11th Edition
Digital Electronics and Microprocessors
Digital Logic Design (CSNB163)
ECE 301 – Digital Electronics
Chapter Four Data Representation in Computers By Bezawit E.
Chapter 2 Number Systems.
Number Systems Rayat Shikshan Sanstha’s
Chapter 2 Number Systems.
Number Systems Rayat Shikshan Sanstha’s
Chapter 2 Number Systems.
Information Representation
Binary, Hexadecimal, and Base 10.
Chapter 2 Number Systems.
Presentation transcript:

Chapter 2: Number Systems The Decimal System The number system that we use in our life is called Decimal System because it contains 10 symbols (0,1,2,3,4,5,6,7,8,9). Any number you write is a combination of these 10 symbols. Like: 9806, 5, 101,..etc. Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems The Need for new system Computers are electronic devices. Since any electronic circuit has only two possible state “ON” and “OFF”. Then the decimal system is not suitable to represent information inside the computer because we need 10 different levels of representations since we have 10 symbols. It means, if you assign 0  ON, 1OFF, how can you represent 2,3,…9? Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems The Binary System The Binary System has only two symbols: 0 and 1 (this is why they called it binary). Any number in the binary system is a sequence of 0 and 1 like: 10111, 100001, 111111,….etc. The binary system is suitable to represent information inside the computer. Because it Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems has only two possible states: 1 ON, 0OFF. These 1s and 0s are referred to as binary digits. It is from this term we got the word BIT as an abbreviation to “Binary Digit”. BIT 1 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems System’s Base When we use more than one number system, system’s base is needed: The following number is written in decimal: (1298)10 Base The following number is written in binary: (10111)2 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Writing Decimal Numbers in the Expansion Form A decimal number like (2067)10 can be rewritten as: 1- Coefficients are: 2,0,6 and 7. 2- Put the weights: (23026170)10 3- Multiply each coefficient by 10it’s weight: (23026170)10 = 2 103 + 0 102 + 6 101 + 7  100 =2000+0+60+7  (2067)10 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Another Example: A decimal number like (5179)10 can be rewritten as: 1- Coefficients are: 5,1,7 and 9. 2- Put the weights: (53127190) 10 3- Multiply each coefficient by 10it’s weight: (53127190) 10 = 5 103 + 1 102 +7 101 + 9  100 =5000+100+70+9  (5179)10 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Different Bases: The binary system has the base 2. For example: (11011)2, (100110)2 The Octal System has only eight symbols (0,1,2,3,4,5,6,7) and it has the base 8. For example: (12706)8, (777)8, (6007)8 The Hexadecimal System has sixteen symbols (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) where A represents 10, B represents 11…F represents 15. For example: (1FC94)16 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Converting Integer Binary Numbers to Their Equivalent in Decimal: Put the weights. Multiply each bit by 2it’s weight Sum the results of multiplications. Ex1: Convert (1011)2 to it’s equivalent in decimal (?)10 (13021110) = 123 + 022 + 121 + 120 = 8+0+2+1  (11)10 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Ex2: Convert (111101)2 to it’s equivalent in decimal (?)10 (151413120110)2 = 125 + 124 + 123 + 122+ 021+ 120 = 32+16+8+4+0+1 = (61)10 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Converting Fractional Binary Numbers to Their Equivalent in Decimal: Put the weights starting from the right of the point (-1, -2,….). Multiply each bit by 2it’s weight Sum the results of multiplications. Ex1: Convert (0.101)2 to it’s equivalent in decimal (?)10 (0.1-10-21-3)2 = 12-1 + 02-2 + 12-3 = 1 / 2 + 0 + 1 / 8  (0.625)10 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Ex2: Convert (0.0011)2 to it’s equivalent in decimal (?)10 (0.0-10-21-31-4)2 = 02-1 + 02-2 + 12-3 + 12-4 = 0 + 0 + 1 / 8 + 1 / 16 = 0.125 + 0.0625 = (0.1875)10 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Ex3: Convert (100011.1001)2 to it’s equivalent in decimal (?)10 Integer Part (100011)2 (150403021110)2 = 125 + 024 + 023 + 022+ 121+ 120 = 32+0+0+0+2+1 = (35)10 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Fraction Part (0.1001)2 (0.1-10-20-31-4)2 = 12-1 + 02-2 + 02-3 + 12-4 = 1 / 2 + 0 + 0 + 1 / 16 = 0. 5 + 0.0625 = (0.5625)10 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Converting Integer Decimal Numbers to Their Equivalent in Binary: Divide the decimal number by 2 (Integer Division). Put the remainder (0 or 1) to the left of the binary number. Apply the same division but on the result from the previous step. Stop division when the result = 0 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Ex1: Convert (11)10 to it’s equivalent in binary (?)2 11  2 = 5 Rem 1 5  2 = 2 Rem 1 2  2 = 1 Rem 0 1  2 = 0 Rem 1 (1 0 1 1)2 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Ex2: Convert (61)10 to it’s equivalent in binary (?)2 61  2 = 30 Rem 1 30  2 = 15 Rem 0 15  2 = 7 Rem 1 7  2 = 3 Rem 1 3  2 = 1 Rem 1 1  2 = 0 Rem 1 (1 1 1 1 0 1)2 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Converting Fractional Decimal Numbers to their Equivalent in Binary: Multiply the fraction with 2. The result in the integer part is either 1 or 0. Put this result to the right of the fraction point of the binary number. Repeat the multiplication on the fractional part until the fraction becomes equal to 0. Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Ex1: Convert (0.625)10 to it’s equivalent in binary (?)2 0.625  2 = 1.25 0.25  2 = 0.5 0.5  2 = 1.0 (0. 1 0 1 )2 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Ex2: Convert (0.1875)10 to it’s equivalent in binary (?)2 0.1875  2 = 0.375 0.375  2 = 0.75 0.75  2 = 1.5 0.5  2 = 1.0 ( 0. 0 0 1 1) 2 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Ex3: Convert (35.5625)10 to it’s equivalent in binary(?)2 Integer Part (35)10 35  2 = 17 Rem 1 17  2 = 8 Rem 1 8  2 = 4 Rem 0 4  2 = 2 Rem 0 2  2 = 1 Rem 0 1  2 = 0 Rem 1 (100011)2 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems The fraction part: 0.5625  2 = 1.125 0.125  2 = 0.25 0.25  2 = 0.5 0.5  2 = 1.0 (0.1001)2 The number is (100011.1001)2 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Binary Addition In decimal system, when you wan to add two numbers like: 4+5 then the result is 9. It means that we can represent the value nine with the symbol 9. But when we add two numbers like 5+8 then we can’t represent the value thirteen with one symbol so we use two symbols 13. Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems Actually 13 comes from 1*101 + 3*100 The same thing is applied in the binary system. 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1  we don’t have a symbol that can represent the value two because in the binary system because the largest value is 1. Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems So, 1 1 + 10 1 1 1 1 1 + 1 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 + 0 1 0 1 1 1 0 0 1 1 0 1 + 1 1 1 0 Chapter 4 - Numbering Systems

Chapter 4 - Numbering Systems 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 + 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 0 1 1 + 1 1 1 0 1 1 1 1 1 1 1 0 0 0 1 0 1 0 1 1 1 Chapter 4 - Numbering Systems