NUMBER SYSTEMS – PART I ICT1001 – I NTRODUCTION TO ICT L ECTURE 2.

Slides:



Advertisements
Similar presentations
Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
Advertisements

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.
Data Representation Computer Organization &
Binary & Decimal numbers = 3* * *10 + 5*1 = 3* * * *10 0 Decimal system: Ten digits: 0,1,2,3,…,9 Example:
Data Representation COE 205
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.
Number Systems.
Simple Data Type Representation and conversion of numbers
Numbering systems.
Computers Organization & Assembly Language
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
Course contents Chapter 1 - section 1.6 Chapter 2 - all sections Chapter – 4.7, and 4.12 Chapter , Chapter 6 - all sections.
Digital Systems Digital Logic and Design Dr. Musab Bassam Zghool Text Book: Mano Morris M. “ Digital Logic And Computer Design ”
MECH1500 Chapter 3.
Number Representation Lecture Topics How are numeric data items actually stored in computer memory? How much space (memory locations) is.
Computer Number System
ECE 3110: Introduction to Digital Systems Number Systems.
Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages.
ECE 2110: Introduction to Digital Systems
ABFC... Home page Introduction Binary number system Hexadecimal number system Binary coded decimal Objectives Octal number system Click.
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.
ECE DIGITAL LOGIC LECTURE 2: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/14/2016.
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.
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
1 Digital Logic Design (41-135) Chapter 5 Number Representation & Arithmetic Circuits Younglok Kim Dept. of Electrical Engineering Sogang University Spring.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
CPE 201 Digital Design Lecture 2: Digital Systems & Binary Numbers (2)
CS2100 Computer Organisation
Programmable Logic Controller
Number Systems & Binary Arithmetic
Data Representation COE 308 Computer Architecture
Binary & Decimal numbers
Appendix F Number Systems binary 0, 1 0, 1, 2, 3, 4, 5, 6, 7
Positional Number Systems Decimal, Binary, Octal and Hexadecimal Numbers Wakerly Section
Digital Design Chapter One Digital Systems and Binary Numbers
Number Systems and Codes
Data Representation ICS 233
Lec 3: Data Representation
Data Representation.
1. Number Systems.
Data Representation Binary Numbers Binary Addition
CHAPTER 1 : INTRODUCTION
Number Systems.
ITE102 – Computer Programming (C++)
Location in course textbook
2.0 COMPUTER SYSTEM 2.2 Number System and Representation
Number System conversions
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Number Systems and Binary Arithmetic
1. Number Systems.
Data Representation in Computer Systems
Numbering System TODAY AND TOMORROW 11th Edition
Numbering Systems and Arithmetic operations on Hex, binary, and octal
Digital Systems and Binary Numbers
Number Systems.
Number Systems Rayat Shikshan Sanstha’s
Binary Addition (1 of 2) Two 1-bit values A B A + B 1
Numeral systems (radix)
Data Representation ICS 233
Number Systems Rayat Shikshan Sanstha’s
Beyond Base 10: Non-decimal Based Number Systems
Information Representation
Data Representation COE 308 Computer Architecture
1. Number Systems Chapt. 2.
Presentation transcript:

NUMBER SYSTEMS – PART I ICT1001 – I NTRODUCTION TO ICT L ECTURE 2

2 You will see this icon often in the slides. Click on them to read more information about a certain topic.

INTRODUCTION TO NUMBER SYSTEMS

4 All (if not most) computer deals with numbers in one form or another (e.g. mp3, image, bioinformatics, DNA, weather prediction) Numbering is one of the most important concepts in computer system

Numbers can be represented in many formats Decimal ٠١٢٣٤٥٦٧٨٩ Arabic 〇一二三四五六七八九 Chinese/ Japanese ൦൧൨൩൪൫൬൭൮൯ Malay

6 The decimal system used in our everyday life cannot be efficiently represented in computer

7 Binary numbers are usually used where Instructions, input data and operations carried out in 0 s and 1 s 01

8 We need to also perform operations on real/floating numbers ( +, -, ×, ÷ precision)

POSITIONAL NUMBER SYSTEM 9

The number system we use is a positional system. Each digit position has an associated weight: It means = 2× × × ×10 0 For example The weight of each digit is a power of 10, increasing to the left. This represents decimal system

11 The decimal number system we use is a radix 10 positional system : each digit position has an associated weight: = 3× × × × × ×10 -2 the weight of each digit is a power of 10, increasing to the left. A decimal point allows for negative powers:

12 In general, a number of the form “d 3 d 2 d 1 d 0.d - 1 d -2 ” in radix 10 positional system has the value: = d 3 × d 2 × d 1 × d 0 × d -1 × d -2 ×10 -2 RADIX 10

13 Similarly, a number of the form “d 3 d 2 d 1 d 0.d -1 d -2 ” in radix 2 positional system has the value: = d 3 ×2 3 + d 2 ×2 2 + d 1 ×2 1 + d 0 ×2 0 + d -1 × d -2 ×2 -2 RADIX 2

14 RADIX r

EXAMPLE – RADIX 2 15

16 Digital circuits can only represent two values: on and off, high and low, or 1 and 0. Numbers are represented by binary digits (bits) which can have a value of either 1 or Most Significant Bit (MSB) Least Significant Bit (LSB)

17 NUMBER CONVERSION What is in decimal?

= 1×8 + 1×4 + 0×2 + 1×1 = = 1× ×64 + 0×32 + 1×16 + 1×8 + 1×4 + 0×2 + 0×1 = = 1×8 + 1×4 + 0×2 + 1×1 + 0× × ×0.125 = More examples:

NUMBER CONVERSION 19 An n-bit unsigned binary number can represent values from 0 to +(2 n -1) e.g. an 4-bit binary number can represent values from 0 to bit binary number

20 The powers of two are everywhere in digital design, so learn them as you work: 1 (2 0 ), 2 (2 1 ), 4 (2 2 ), 8 (2 3 ), 16 (2 4 ), 32 (2 5 ), 64 (2 6 ), 128 (2 7 ), 256 (2 8 ), 512 (2 9 ), 1024 (2 10 ), …

21 To speed up conversion, please learn how to convert using calculator (only non-programmable digital calculators are allowed) Link:

CONVERSION ALGORITHM 22 Divide by 2 Record quotient (Q) and remainder R Is Q=0 ? Collect R’s into desired binary number with first R as LSB and last R as MSB End Start Yes No Examples: ÷ 2 = 56 remainder 1 (LSB) ÷ 2 = 28 remainder ÷ 2 = 14 remainder ÷ 2 = 7 remainder ÷ 2 = 3 remainder ÷ 2 = 1 remainder ÷ 2 = 0 remainder 1 (MSB) = MSB LSB

23 HEX REPRESENTATION Binary digits for large numbers are long and tedious to write and remember Hexadecimal representation is usually used

24 HEXADECIMAL IS RADIX 16 0, 1, 2, 3, …, 8, 9, A, B, C, D, E, F These are the symbols used in Hexadecimal system

HEX CONVERSION 25 One hex digit equals four binary digits (since 2 4 = 16). Hence conversion is very simple. We arrange binary digits in groups of 4: B9F 16 = B 9 F

26 Hex representation is widely used for memory address and data. memory address

27 BinaryDecimalHex A B C D E F This table shows binary, and hex representation for values from 0 to 15.

28 KNOWLEDGE CHECK TIME! Please attempt a quiz on LMS

29 Why 15? An n-bit unsigned binary number can represent values from 0 to +(2 n -1) A 4-bit unsigned binary number can represent values from 0 to +(2 4 -1)= 15 BACK

30 How do you understand this diagram? In the example in the slide it says: an 4-bit binary number can represent values from 0 to 15. So in the diagram you can see that value from 0 to 15 are representable. Values greater than 15 are not representable, we say it is “Overflow”. BACK

31 Examples: ÷ 2 = 56 remainder 1 (LSB) ÷ 2 = 28 remainder ÷ 2 = 14 remainder ÷ 2 = 7 remainder ÷ 2 = 3 remainder ÷ 2 = 1 remainder ÷ 2 = 0 remainder 1 (MSB) = MSB LSB In this example, we convert 113 in decimal into binary representation. First, divide 113 by 2, we get 1 as the remainder. Continue this step until we have 1 divide by 2, which gives 0 as the quotient. This is when we STOP. The last remainder is the first digit (most significant bit) in the binary representation. Try other example to practice this conversion. BACK

32 Why 1101 is B in hexadecimal? To understand why, first, convert 1101 to decimal 1101 = 1x8 + 1x4 + 0x2 + 1 = in decimal is B in hexadecimal BACK