Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems

Similar documents
Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems

Math 230 Assembly Language Programming (Computer Organization) Numeric Data Lecture 2

Lesson 1.1 MEASUREMENT, UNITS, SCIENTIFIC NOTATION, AND PRECISION

INDUSTRIAL ELECTRICITY

Introduction to Digital Logic Missouri S&T University CPE 2210 Subtractors

1.1 - Scientific Theory

Unit 3. Digital encoding

Defining Physical Science

Precision, Accuracy Measurements, Units, Scientific Notation

Chapter 1: The Science of Physics. Physics 1-2 Mr. Chumbley

Chemistry 11. Unit 2 : Introduction to Chemistry

Lecture 2: Units/Coordinates/Definitions

Introduction to Chemistry

ENG2410 Digital Design Introduction to Digital Systems. Fall 2017 S. Areibi School of Engineering University of Guelph

Worksheet 1 Units, Signifiant Figures, Dimensional Analysis, & Density

Introduction to Digital Logic Missouri S&T University CPE 2210 Combinatorial Circuit Analysis and Synthesis

Design of Digital Circuits Reading: Binary Numbers. Required Reading for Week February 2017 Spring 2017

Chapter 5 Measurements and Calculations Objectives

SPH3U Measurement and Analysis Mr. LoRusso Introduction

QUANITY NAME OF UNIT ABBREVIATION length meter m mass kilogram kg time second s

ENGIN 112 Intro to Electrical and Computer Engineering

Chapter 1 CSCI

Section 5.1 Scientific Notation and Units Objectives

CPE100: Digital Logic Design I

Four Important Number Systems

ENGIN 112 Intro to Electrical and Computer Engineering

ECE380 Digital Logic. Positional representation

What is Physics? It is a Science

Introduction to Digital Logic Missouri S&T University CPE 2210 PLDs

CSE 241 Digital Systems Spring 2013

Introduction to Digital Logic Missouri S&T University CPE 2210 Multiplexers/Demultiplexers

Introduction to Digital Logic Missouri S&T University CPE 2210 Boolean Algebra

How do computers represent numbers?

8/17/2016. Summary. Summary. Summary. Chapter 1 Quantities and Units. Passive Components. SI Fundamental Units. Some Important Electrical Units

Introduction to Digital Logic Missouri S&T University CPE 2210 Karnaugh Maps

Representation of SI Units and Prefixes

Worksheet 2 Units, Signifiant Figures, Dimensional Analysis, & Density

Introduction to digital systems. Juan P Bello

Name of Lecturer: Mr. J.Agius. Lesson 41. Chapter 8: Prefixes. In the Metric System there are standard ways of talking about big and small numbers:

Measuring Time, Space, and Matter. Units of Measurement

Unit Conversions. O Keefe - LBHS

Clinical Chemistry Lecture Guide

Unit 1. ET Unit 1. Quantities, Units, and Electrical Safety. Electronics Fundamentals Circuits, Devices and Applications - Floyd

Table of SI prefixes

Advanced Physics Summer Assignment.

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System?

EE260: Digital Design, Spring n Digital Computers. n Number Systems. n Representations. n Conversions. n Arithmetic Operations.

MET 487 Instrumentation and Automatic Control. Lecture 3

Serway AP Physics. Chapter 1

Appendix: a brief history of numbers

A negative exponent is equal to the inverse of the same number with a positive exponent. 18!! = 1 18!

SI UNITS AND SOME CONVERSION FACTORS. A. Woldai, B. Makkawi, and D. Al-Gobaisi International Center for Water and Energy Systems, Abu Dhabi, UAE

ECE260: Fundamentals of Computer Engineering

AQA Physics A-level Section 1: Measurements and Their Errors

Number Representation and Waveform Quantization

Lecture notes on * Measurement and Error * Least Square Fitting

Introduction to Digital Logic Missouri S&T University CPE 2210 Boolean Representations

Week No. 06: Numbering Systems

Notes: Measurement and Calculation

SI base units. SI : Système International d'unités (International System of Units)

Mark Redekopp, All rights reserved. Lecture 1 Slides. Intro Number Systems Logic Functions

LECTURE 4 - Units Used in Measurements

International System of Units (SI)

CHAPTER 2 NUMBER SYSTEMS

PY1007: Physics for Engineers I

Menu. Review of Number Systems EEL3701 EEL3701. Math. Review of number systems >Binary math >Signed number systems

Physics 11. Unit 1 Mathematical Toolkits

Topics Covered in This Chapter:

Unit 2 Physical Quantities & Measuring Length

CPE100: Digital Logic Design I

Chapter 1. Chapter 1

ECE 372 Microcontroller Design

PHYSICS. Complete Study Material and 1000 Objective bits Useful for all SSC, RRB & Group Exams METRE

PHYSICS. Chapter 1 Review. Rounding Scientific Notation Factor Label Conversions

GCE A level 1326/01-D PHYSICS PH6 Data Analysis Task

of Digital Electronics

Additional Formula Sheet for Final Exam

International System of Units (SI)

Read Sections 1.10 and Appendix A-1 before viewing this slide show.

THE METRIC SYSTEM. International System of Units SI

Who am I? CHEM 110 General Chemistry King Abdul Aziz University Jeddah KSA. How to reach me?

Chapter 4 Number Representations

12/31/2010. Digital Operations and Computations Course Notes. 01-Number Systems Text: Unit 1. Overview. What is a Digital System?

Introduction to the World of Energy

CLASS 11th. Mole Concept

Review of Fundamental Mathematics, Measurement & Graphing Techniques

Today is Thursday, February 11 th, 2016

Tute UV1 : MEASUREMENT 1

Binary addition example worked out

Ch. 2 Notes: ANALYZING DATA MEASUREMENT NOTE: Vocabulary terms are in boldface and underlined. Supporting details are in italics.

Chemistry 101. Dr. Lucio Gelmini Room 5-132A

Chapter 1 :: From Zero to One

Cs302 Quiz for MID TERM Exam Solved

Number vs. Quantity. Quantity - number + unit UNITS MATTER!! for a measurement to be useful, must include both a number and unit

W H AT I S P H Y S I C S?

Tools of Chemistry. Measurement Scientific Method Lab Safety & Apparatus

Ch. 2 Notes: ANALYZING DATA MEASUREMENT NOTE: Vocabulary terms are in boldface and underlined. Supporting details are in italics.

Formula Sheet for Exam #2

Unit 1. Scientific activity

I. Qualit a Qualit t a ive iv vs. Quantit Quan a tit tiv a e tiv Measurements

Transcription:

Introduction to Digital Logic Missouri S&T University CPE 2210 Number Systems Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of Science and Technology cetinkayae@mst.edu http://web.mst.edu/~cetinkayae/teaching/cpe2210fall2016 26 August 2016 rev. 16.0 2014 2016 Egemen K. Çetinkaya

Number Systems Outline Signals and representations Number systems Summary 26 August 2016 MST CPE2210 Number Systems 2

Digital vs. Analog Analog Signal Signal: physical phenomenon has unique value at every instant of time Analog signal (aka continuous signal) Infinite set of possible values Examples: temperature: 72.16 F degrees human speech pressure light value time Possible values: 1.00, 1.01, 2.0000009,... infinite possibilities 26 August 2016 MST CPE2210 Number Systems 3

Digital vs. Analog Digital Signal Signal: physical phenomenon has unique value at every instant of time Digital signal (aka discrete signal) Finite set of possible values Examples: pressing a button on keypad switch on/off value 4 3 2 1 0 time Possible values: 0, 1, 2, 3, or 4. That s it. 26 August 2016 MST CPE2210 Number Systems 4

Digital Systems Representations Digital signals represented by two values on/off, 0/1 Two-value representation: binary representation A single value is called bit (binary digit) Digital system: take digital inputs generates digital outputs Digital circuits: connection of digital components value Embedded systems: for a particular purpose 1 0 time 26 August 2016 MST CPE2210 Number Systems 5

Why binary system? Digital Systems Representations 26 August 2016 MST CPE2210 Number Systems 6

Why binary system? Digital Systems Representations Ease of operation compared to 3 digits or more ease of storage, computing, transmission Transistors operate on two-value logic transistor is a basic electrical circuit component 26 August 2016 MST CPE2210 Number Systems 7

Digital-Analog Conversion (a) ADC (A2D) and DAC (D2A) wire microphone analog-todigital converter Volts 3 2 1 0 samples Egemen K. Çetinkaya analog signal on wire 00 01 10 10 11 11 11 01 10 10 00 time digitized signal 0001101011111101101000 (b) 0001101011111101101000 read from tape, CD, etc. wire speaker digital-toanalog converter Volts 3 2 1 0 00 01 10 10 11 11 11 01 10 10 00 analog signal reproduced from digitized signal time 26 August 2016 MST CPE2210 Number Systems 8

Digital vs. Analog Pros and Cons What are the pros and cons of analog vs. digital? 26 August 2016 MST CPE2210 Number Systems 9

Digital vs. Analog Pros and Cons What are the pros and cons of analog vs. digital? Analog signal is prone to noise amplified during transmission, storage, processing Digitized analog signal is never exact due to sampling Digital signal can be compressed repetitive patterns can be encoded in other way 00000000 00 26 August 2016 MST CPE2210 Number Systems 10

Number Systems Overview Type Natural numbers N Explanation {0, 1, 2, } Integers Z {, -2, -1, 0, 1, 2, } Rational numbers Q m/n where m and n are integers and n 0: e.g. 5/4, -8/3 Irrational numbers JJ Any real number that can t be expressed as ratio of integers e.g.: π, e, 2 Real numbers R Rational & irrational numbers, +, 0, or Complex numbers C a+bi, where i 2 = 1 and a and b are real numbers 26 August 2016 MST CPE2210 Number Systems 11

Number Systems Representation Type Explanation positive x > 0 negative x < 0 non-negative x 0 non-positive x 0 signed (in computing) represents both negative and positive numbers unsigned (in computing) represents only non-negative numbers 26 August 2016 MST CPE2210 Number Systems 12

Number Systems Representations Important bases throughout the class: Decimal (base 10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Binary (base 2) [0, 1] Octal (base 8) [0, 1, 2, 3, 4, 5, 6, 7] Hexadecimal (base 16) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F] For the number 3205, what is the minimum base? 26 August 2016 MST CPE2210 Number Systems 13

Number Systems Floating Point vs. Fixed Point Representation Floating point approximates real number 2015.82814 = + 2.01582814 x 10 3 exponent sign mantissa (significand) base IEEE 754 standard is followed Fixed point: radix is fixed at a point less costly to represent compared to floating point Other real number representations: binary-coded decimal (BCD) logarithmic number systems 26 August 2016 MST CPE2210 Number Systems 14

Number Systems Decimal Representation position 3 2 1 0-1 -2 weight b 3 b 2 b 1 b 0 b -1 b -2 digit a 3 a 2 a 1 a 0 a -1 a -2 decimal example weight 10 3 10 2 10 1 10 0 10-1 10-2 decimal example digit 2 0 1 5 0 8 whole part fractional part radix (decimal) point 26 August 2016 MST CPE2210 Number Systems 15

Number Systems Binary Representation position 3 2 1 0-1 -2 weight b 3 b 2 b 1 b 0 b -1 b -2 digit a 3 a 2 a 1 a 0 a -1 a -2 binary example weight 2 3 2 2 2 1 2 0 2-1 2-2 binary example digit 1 0 1 1 1 0 binary point 26 August 2016 MST CPE2210 Number Systems 16

Number Systems Octal Representation position 3 2 1 0-1 -2 weight b 3 b 2 b 1 b 0 b -1 b -2 digit a 3 a 2 a 1 a 0 a -1 a -2 octal example weight 8 3 8 2 8 1 8 0 8-1 8-2 octal example digit 1 7 5 3 6 2 26 August 2016 MST CPE2210 Number Systems 17

Number Systems Hexadecimal Representation position 3 2 1 0-1 -2 weight b 3 b 2 b 1 b 0 b -1 b -2 digit a 3 a 2 a 1 a 0 a -1 a -2 hex example weight 16 3 16 2 16 1 16 0 16-1 16-2 hex example digit 2 0 A F 0 0 26 August 2016 MST CPE2210 Number Systems 18

Binary Systems Powers of Two 2 0 = 2 1 = 2 2 = 2 3 = 2 4 = 2 5 = 2 6 = 2 7 = 2 8 = 2 9 = 2 10 = 26 August 2016 MST CPE2210 Number Systems 19

Binary Systems Powers of Two 2 0 = 1 2 1 = 2 2 2 = 4 2 3 = 8 2 4 = 16 2 5 = 32 2 6 = 64 2 7 = 128 2 8 = 256 2 9 = 512 2 10 = 1024 26 August 2016 MST CPE2210 Number Systems 20

Number System Conversion Binary to Decimal binary 1 binary weight 2 0 multiply weights and add decimal 1 binary 1 0 binary weight 2 1 2 0 decimal 2 + 0 = 2 binary 1 0 1 binary weight 2 2 2 1 2 0 decimal 4 + 0 + 1 = 5 Egemen K. Çetinkaya 26 August 2016 MST CPE2210 Number Systems 21

Number System Conversion Binary to Decimal Egemen K. Çetinkaya binary 0 1 1 binary weight 2 2 2 1 2 0 decimal 0 + 2 + 1 = 3 binary 1 0 1. 1 binary weight 2 2 2 1 2 0 2-1 decimal 4 + 0 + 1 + 0.5 = 5.5 26 August 2016 MST CPE2210 Number Systems 22

Number System Conversion Decimal to Binary Egemen K. Çetinkaya Desired decimal number: 12 Current sum Binary number (a) 16 > 12, too big; Put 0 in 16 s place 0 0 16 8 4 2 1 (b) 8 <= 12, so put 1 in 8 s place, current sum is 8 8 0 1 16 8 4 2 1 (c) 8+4=12 <= 12, so put 1 in 4 s place, current sum is 12 12 0 1 1 16 8 4 2 1 a (d) Reached desired 12, so put 0s in remaining places done 0 1 1 0 0 16 8 4 2 1 26 August 2016 MST CPE2210 Number Systems 23

Number Systems Base 16 System hex binary hex binary 0 8 1 9 2 A 3 B 4 C 5 D 6 E 7 F 26 August 2016 MST CPE2210 Number Systems 24

Number Systems Base 16 System hex binary 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 hex binary 8 1000 9 1001 A 1010 B 1011 C 1100 D 1101 E 1110 F 1111 26 August 2016 MST CPE2210 Number Systems 25

Number System Conversion Hex to Binary Examples Egemen K. Çetinkaya 26 August 2016 MST CPE2210 Number Systems 26

Number System Conversion Binary to Hex Examples Egemen K. Çetinkaya 26 August 2016 MST CPE2210 Number Systems 27

Number System Conversion Hex to Decimal Examples Egemen K. Çetinkaya 26 August 2016 MST CPE2210 Number Systems 28

Number System Conversion Decimal to Hex Examples Egemen K. Çetinkaya 26 August 2016 MST CPE2210 Number Systems 29

LSB: Least Significant Bit right-most bit MSB: Most Significant Bit higher-order bit left-most bit Number Systems Representations Example: where is LSB and MSB? 1 0 1 0 1 1 0 1 26 August 2016 MST CPE2210 Number Systems 30

LSB: Least Significant Bit right-most bit MSB: Most Significant Bit higher-order bit left-most bit Example: LSB MSB Number Systems Representations 1 0 1 0 1 1 0 1 26 August 2016 MST CPE2210 Number Systems 31

bit: binary digit (b) Byte: 8-bits (B) nibble: 4-bits Number Systems Representations 1 0 1 0 1 1 0 1 high nibble low nibble 26 August 2016 MST CPE2210 Number Systems 32

Performance Metrics Unit Multipliers SI decimal 10 1 deci d 10 1 deka da 10 2 centi c 10 2 hecto h EIC binary 10 3 milli m 10 3 kilo k 2 10 kibi Ki 10 6 micro µ 10 6 Mega M 2 20 mebi Mi 10 9 nano n 10 9 Giga G 2 30 gibi Gi 10 12 pico p 10 12 Tera T 2 40 tebi Ti 10 15 femto f 10 15 Peta P 2 50 pebi Pi 10 18 atto a 10 18 Exa E 2 60 exbi Ei 10 21 zepto z 10 21 Zetta Z 10 24 yocto y 10 24 Yotta Y Egemen K. Çetinkaya 26 August 2016 MST CPE2210 Number Systems 33

Signals can be: analog: continuous digital: discrete Important terminology: bit, byte, nibble, LSB, MSB Number Systems Summary Important number systems: decimal, binary, hex, octal Conversions will be needed throughout your careers: know 2 0-2 10 by heart 26 August 2016 MST CPE2210 Number Systems 34

References and Further Reading [V2011] Frank Vahid, Digital Design with RTL Design, VHDL, and Verilog, 2nd edition, Wiley, 2011. 26 August 2016 MST CPE2210 Number Systems 35

End of Foils 26 August 2016 MST CPE2210 Number Systems 36