CS 151 Digital Systems Design Lecture 2 Number Systems Prof. Ahmed Sameh Room 239A.

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

DATA REPRESENTATION CONVERSION.
Lecturer: Omid Jafarinezhad Sharif University of Technology Department of Computer Engineering 1 Fundamental of Programming (C) Lecture 2 Number Systems.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 3 Dr. Shi Dept. of Electrical and Computer Engineering.
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Level ISA3: Information Representation
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:
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
ENGIN112 L2: Number Systems September 5, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 2 Number Systems Russell Tessier KEB 309 G.
1 CSE-221 Digital Logic Design (DLD) Lecture-1: Digital Systems & Number Systems.
Chapter 02 Binary Values and Number Systems Nell Dale & John Lewis.
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
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.
Chapter 1 1 Number Systems. 2 Objectives  Understand why computers use binary (Base-2) numbering.  Understand how to convert Base-2 numbers to Base-
Long multiplication Long division
Dr. Bernard Chen Ph.D. University of Central Arkansas
CS231 Fundamentals1 Fundamentals What kind of data do computers work with? – Deep down inside, it’s all 1s and 0s What can you do with 1s and 0s? – Boolean.
Numbering systems.
CS105 INTRODUCTION TO COMPUTER CONCEPTS BINARY VALUES & NUMBER SYSTEMS Instructor: Cuong (Charlie) Pham.
Chapter 3 Data Representation
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
Data Representation in Computer Systems. 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers.
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,
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in other bases.
Dr. Ahmed Telba EE208: Logic Design Lecture# 1 Introduction & Number Systems.
Number systems, Operations, and Codes
Binary Values and Number Systems
Positional Notation 642 in base 10 positional notation is:
Number Base Conversions
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
Chapter 2 Number Systems: Decimal, Binary, and Hex.
Digital Systems and Binary Numbers
Lecture 1: 8/27/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Chapter 2 Number Systems Consists of a set of symbols called digits and a set of relations such as +, -, x, /.
Introduction To Number Systems Binary System M. AL-Towaileb1.
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
Computer Number System
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
CS151 Introduction to Digital Design Chapter 1: Digital Systems and Information Lecture 2 1Created by: Ms.Amany AlSaleh.
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 01 Numbers. Chapter 02 Base 10 example Decimal Number Place Place (place - 1) ===============================
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Week 1(Number System) Muhammad Ammad uddin Logic Design Lab I (CEN211)
CPE 201 Digital Design Lecture 2: Digital Systems & Binary Numbers (2)
Introduction To Number Systems
Digital Design Chapter One Digital Systems and Binary Numbers
Chapter 02 Nell Dale & John Lewis.
Discrete Mathematics Numbering System.
1. Number Systems.
Digital Systems and Binary Numbers
Integer Real Numbers Character Boolean Memory Address CPU Data Types
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
Digital Systems and Binary Numbers
Number Systems.
Number Systems Give qualifications of instructors:
Chapter 3 Data Representation
Number System conversions
Fundamentals & Ethics of Information Systems IS 201
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
Number Systems and Binary Arithmetic
Numbering System TODAY AND TOMORROW 11th Edition
Digital Electronics and Microprocessors
Digital Systems and Binary Numbers
Chapter Four Data Representation in Computers By Bezawit E.
Number Systems Rayat Shikshan Sanstha’s
Introduction To Number Systems
Presentation transcript:

CS 151 Digital Systems Design Lecture 2 Number Systems Prof. Ahmed Sameh Room 239A

Overview °The design of computers It all starts with numbers Building circuits Building computing machines °Digital systems °Understanding decimal numbers °Binary and octal numbers The basis of computers! °Conversion between different number systems

Digital Computer Systems °Digital systems consider discrete amounts of data. °Examples 26 letters in the alphabet 10 decimal digits °Larger quantities can be built from discrete values: Words made of letters Numbers made of decimal digits (e.g ) °Computers operate on binary values (0 and 1) °Easy to represent binary values electrically Voltages and currents. Can be implemented using circuits Create the building blocks of modern computers

Understanding Decimal Numbers °Decimal numbers are made of decimal digits: (0,1,2,3,4,5,6,7,8,9) °But how many items does a decimal number represent? 8653 = 8x x x x10 0 °What about fractions? = 9x x x x x x x10 -2 In formal notation -> ( ) 10 °Why do we use 10 digits, anyway?

Understanding Octal Numbers °Octal numbers are made of octal digits: (0,1,2,3,4,5,6,7) °How many items does an octal number represent? (4536) 8 = 4x x x x8 0 = (1362) 10 °What about fractions? (465.27) 8 = 4x x x x x8 -2 °Octal numbers don’t use digits 8 or 9 °Who would use octal number, anyway?

Understanding Binary Numbers °Binary numbers are made of binary digits (bits): 0 and 1 °How many items does an binary number represent? (1011) 2 = 1x x x x2 0 = (11) 10 °What about fractions? (110.10) 2 = 1x x x x x2 -2 °Groups of eight bits are called a byte ( ) 2 °Groups of four bits are called a nibble. (1101) 2

Why Use Binary Numbers? °Easy to represent 0 and 1 using electrical values. °Possible to tolerate noise. °Easy to transmit data °Easy to build binary circuits. AND Gate 1 0 0

Conversion Between Number Bases Decimal(base 10) Octal(base 8) Binary(base 2) Hexadecimal (base16) °Learn to convert between bases. °Already demonstrated how to convert from binary to decimal. °Hexadecimal described in next lecture.

Convert an Integer from Decimal to Another Base 1.Divide decimal number by the base (e.g. 2) 2.The remainder is the lowest-order digit 3.Repeat first two steps until no divisor remains. For each digit position: Example for (13) 10: Integer Quotient 13/2 = 6 + ½ a 0 = 1 6/2 = a 1 = 0 3/2 = 1 + ½ a 2 = 1 1/2 = 0 + ½ a 3 = 1 RemainderCoefficient Answer (13) 10 = (a 3 a 2 a 1 a 0 ) 2 = (1101) 2

Convert an Fraction from Decimal to Another Base 1.Multiply decimal number by the base (e.g. 2) 2.The integer is the highest-order digit 3.Repeat first two steps until fraction becomes zero. For each digit position: Example for (0.625) 10: Integer x 2 = a -1 = x 2 = a -2 = x 2 = a -3 = 1 FractionCoefficient Answer (0.625) 10 = (0.a -1 a -2 a -3 ) 2 = (0.101) 2

The Growth of Binary Numbers n2n2n 02 0 = = = = = = = =128 n2n2n 82 8 = = = = = =1M =1G =1T Mega Giga Tera

Binary Addition °Binary addition is very simple. °This is best shown in an example of adding two binary numbers… carries

Binary Subtraction °We can also perform subtraction (with borrows in place of carries). °Let’s subtract (10111) 2 from ( ) 2 … borrows

Binary Multiplication °Binary multiplication is much the same as decimal multiplication, except that the multiplication operations are much simpler… X

Convert an Integer from Decimal to Octal 1.Divide decimal number by the base (8) 2.The remainder is the lowest-order digit 3.Repeat first two steps until no divisor remains. For each digit position: Example for (175) 10: Integer Quotient 175/8 = /8 a 0 = 7 21/8 = 2 + 5/8 a 1 = 5 2/8 = 0 + 2/8 a 2 = 2 RemainderCoefficient Answer (175) 10 = (a 2 a 1 a 0 ) 2 = (257) 8

Convert an Fraction from Decimal to Octal 1.Multiply decimal number by the base (e.g. 8) 2.The integer is the highest-order digit 3.Repeat first two steps until fraction becomes zero. For each digit position: Example for (0.3125) 10: Integer x 8 = a -1 = x 8 = a -2 = 4 FractionCoefficient Answer (0.3125) 10 = (0.24) 8

Summary °Binary numbers are made of binary digits (bits) °Binary and octal number systems °Conversion between number systems °Addition, subtraction, and multiplication in binary