Number Systems. TA: Mamun. References: Lecture notes of Introduction to Information Technologies (ITEC 1011) by Dr Scott MacKenzie

Similar documents
ITEC 1011 Introduction to Information Technologies

Common Number Systems

College of Computer and Information Sciences Department of Computer Science. CSC 220: Computer Organization. Unit1 Number Systems

Octal & Hexadecimal Number Systems. Digital Electronics

COE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design

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

CMPE223/CMSE222 Digital Logic Design. Positional representation

COMP Overview of Tutorial #2

TOPICS. Other Number Systems. Other Number Systems 9/9/2017. Octal Hexadecimal Number conversion

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

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh

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

Chapter 3 DATA REPRESENTATION

CHW 261: Logic Design

Digital Fundamentals

T02 Tutorial Slides for Week 2

Conversion Between Number Bases

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

Fundamentals of Programming

DATA REPRESENTATION. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift, Jaipur Region. Based on CBSE curriculum Class 11. Neha Tyagi, KV 5 Jaipur II Shift

Homework 1 graded and returned in class today. Solutions posted online. Request regrades by next class period. Question 10 treated as extra credit

MACHINE LEVEL REPRESENTATION OF DATA

Digital Logic Lecture 2 Number Systems

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

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

Number representations

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

CHAPTER 2 (b) : AND CODES

Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee

Switching Circuits and Logic Design Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

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

Number Systems. Dr. Tarek A. Tutunji Philadelphia University, Jordan

Computer Arithmetic. Appendix A Fall 2003 Lec.03-58

Data Representation and Binary Arithmetic. Lecture 2

TOPIC: NUMBER SYSTEMS

Chapter 2 Number Systems and Codes Dr. Xu

Lecture 1: Digital Systems and Number Systems

UNIT1: COMPUTERNUMBER SYSTEM

umber Systems bit nibble byte word binary decimal

Chapter 2 Binary Values and Number Systems

Digital Computers and Machine Representation of Data

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

data within a computer system are stored in one of 2 physical states (hence the use of binary digits)

Binary Codes. Dr. Mudathir A. Fagiri

Numbers!!...is that right? CSCI 255

Tutorial for Chapter 3, 4

Lecture (01) Introduction Number Systems and Conversion (1)

Number System. Introduction. Decimal Numbers

Lecture 2: Number Systems

Data Representation COE 301. Computer Organization Prof. Muhamed Mudawar

LECTURE 1-2. Introduction and Number Systems

Number Systems and Their Representations

Bits. Binary Digits. 0 or 1

Korea University of Technology and Education

Microcomputers. Outline. Number Systems and Digital Logic Review

CS 261 Fall Binary Information (convert to hex) Mike Lam, Professor

Chapter (1) Eng. Mai Z. Alyazji

Number Systems & Encoding

Numbering systems. Dr Abu Arqoub

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010

SE311: Design of Digital Systems

Beginning C Programming for Engineers

CS & IT Conversions. Magnitude 10,000 1,

Digital Fundamentals

Inf2C - Computer Systems Lecture 2 Data Representation

CS321. Introduction to Numerical Methods

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

Harry H. Porter, 2006

Introduction to Computer Science (I1100) With 1 coin 2 possibilities: Head / Tail or 0/1

Information Science 1

Decimal/Binary Conversion on the Soroban

Operators. Lecture 3 COP 3014 Spring January 16, 2018

CS 101: Computer Programming and Utilization

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

Number Systems CHAPTER Positional Number Systems

Decimal & Binary Representation Systems. Decimal & Binary Representation Systems

Step Octal Number Binary Number Step Step

Chapter 2 Data Representations

1.3 Systems of numeration: To represent quantities in the different systems of numeration, specific symbols are used, which are also called ciphers.

Level ISA3: Information Representation

Objectives. Connecting with Computer Science 2

Course Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation

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

Octal and Hexadecimal Integers

CMPS 10 Introduction to Computer Science Lecture Notes

Chapter 1 Review of Number Systems

QUIZ: Generations of computer technology. Hardware:

Digital Fundamentals

Data Representations & Arithmetic Operations

Number Systems. Both numbers are positive

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

in this web service Cambridge University Press

Values, Variables, Types & Arithmetic Expressions. Agenda

Course Syllabus [1/2]

Introduction to Numbering Systems

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

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

Release 0.8. Multi-Purpose Light Unit Technical Reference Manual

COMP2611: Computer Organization. Data Representation

Transcription:

Number Systems TA: Mamun References: Lecture notes of Introduction to Information Technologies (ITEC 1011) by Dr Scott MacKenzie

Common Number Systems System Base Symbols Decimal 10 0, 1, 9 Binary 2 0, 1 Octal 8 0, 1, 7 16 0, 1, 9, A, B, F

Counting Decimal Binary Octal 0 0 0 0 1 1 1 1 2 10 2 2 3 11 3 3 4 100 4 4 5 101 5 5 6 110 6 6 7 111 7 7 Decimal Binary Octal 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F

Counting Decimal Binary Octal 16 10000 20 10 17 10001 21 11 18 10010 22 12 19 10011 23 13 20 10100 24 14 21 10101 25 15 22 10110 26 16 23 10111 27 17 24 10 =? 24 10 = 11000 2 = 30 8 = 18 16

Decimal to Decimal Decimal Octal Binary

125 10 =>? 10 - Multiply each bit by 10 n, where n is the weight of the bit - The weight is the position of the bit, starting from 0 on the right Weight 125 10 => 5 x 10 0 = 5 2 x 10 1 = 20 1 x 10 2 = 100 125 Add the results Base

Binary to Decimal Decimal Octal Binary

Binary to Decimal Technique 1. Multiply each bit by 2 n, where n is the weight of the bit 2. The weight is the position of the bit, starting from 0 on the right 3. Add the results

101011 2 =>? 10 101011 2 => 1 x 2 0 = 1 1 x 2 1 = 2 0 x 2 2 = 0 1 x 2 3 = 8 0 x 2 4 = 0 1 x 2 5 = 32 43 10

Octal to Decimal Decimal Octal Binary

Octal to Decimal Technique 1. Multiply each bit by 8 n, where n is the weight of the bit 2. The weight is the position of the bit, starting from 0 on the right 3. Add the results

724 8 =>? 10 724 8 => 4 x 8 0 = 4 2 x 8 1 = 16 7 x 8 2 = 448 468 10

to Decimal Decimal Octal Binary

to Decimal Technique 1. Multiply each bit by 16 n, where n is the weight of the bit 2. The weight is the position of the bit, starting from 0 on the right 3. Add the results

ABC 16 =>? 10 Decimal Binary Octal 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F ABC 16 => C x 16 0 = 12 x 1 = 12 B x 16 1 = 11 x 16 = 176 A x 16 2 = 10 x 256 = 2560 2748 10

Decimal to Binary Decimal Octal Binary

Decimal to Binary Technique 1. Divide by 2, keep track of the remainder 2. First remainder is LSB, least-significant bit 3. Last remainder is MSB, most-significant bit

125 10 =? 2 2 125 2 62 1 2 31 0 2 15 1 2 7 1 2 3 1 2 1 1 0 1 125 10 = 1111101 2

Decimal to Octal Decimal Octal Binary

Decimal to Octal Technique 1. Divide by 8 2. Keep track of the remainder

1234 10 =? 8 8 1234 8 154 2 8 19 2 8 2 3 0 2 1234 10 = 2322 8

Decimal to Decimal Octal Binary

Decimal to Technique 1. Divide by 16 2. Keep track of the remainder

1234 10 =? 16 16 1234 16 77 2 16 4 13 = D 0 4 1234 10 = 4D2 16

Any base to any base Base-x Base-y

Any base to any base Technique 1. Use Decimal as an intermediary Base-x Base-y Decimal

432 4 =? 7 432 4 =>? 10 =>? 7 432 4 => 2 x 4 0 7 78 = 2 3 x 4 1 7 11 1 = 12 4 x 4 2 = 64 7 1 4 78 0 1 10 78 10 = 141 7 432 4 = 141 7

Conversion Among Bases Division algorithm Base-y Decimal Octal Base-x Binary

Octal to Binary Decimal Octal Binary

Octal to Binary Technique Convert each octal digit to a 3-bit equivalent binary representation

705 8 =? 2 Decimal Binary Octal 0 0 0 0 1 1 1 1 2 10 2 2 3 11 3 3 4 100 4 4 5 101 5 5 6 110 6 6 7 111 7 7 7 0 5 111 000 101 705 8 = 111000101 2

to Binary Decimal Octal Binary

to Binary Technique Convert each hexadecimal digit to a 4-bit equivalent binary representation

10AF 16 =? 2 Decimal Binary Octal 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F 1 0 A F 0001 0000 1010 1111 10AF 16 = 0001000010101111 2

Binary to Octal Technique 1. Group bits in threes, starting on right 2. Convert to octal digits

1011010111 2 =? 8 Decimal Binary Octal 0 0 0 0 1 1 1 1 2 10 2 2 3 11 3 3 4 100 4 4 5 101 5 5 6 110 6 6 7 111 7 7 1 011 010 111 1 3 2 7 1011010111 2 = 1327 8

Binary to Decimal Octal Binary

Binary to Technique 1. Group bits in fours, starting on right 2. Convert to hexadecimal digits

1010111011 2 =? 16 Decimal Binary Octal 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F 10 1011 1011 2 B B 1010111011 2 = 2BB 16

Octal to Decimal Octal Binary

Octal to Technique Use binary as an intermediary

1076 8 =? 16 1 0 7 6 Decimal Binary Octal 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F 001 000 111 110 2 3 E 1076 8 = 23E 16

to Octal Decimal Octal Binary

to Octal Technique Use binary as an intermediary

1F0C 16 =? 8 Decimal Binary Octal 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F 1 F 0 C 0001 1111 0000 1100 1 7 4 1 4 1F0C 16 = 17414 8

Conversion Among Bases Short-cut Octal Binary

Questions? Next tutorial ASCII UTF-8 Floating-point arithmetic