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

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

INDUSTRIAL ELECTRICITY

1.1 - Scientific Theory

Unit 3. Digital encoding

Precision, Accuracy Measurements, Units, Scientific Notation

Defining Physical Science

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

Lecture 2: Units/Coordinates/Definitions

Chemistry 11. Unit 2 : Introduction to Chemistry

Introduction to Chemistry

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

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

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

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

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

Section 5.1 Scientific Notation and Units Objectives

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

Four Important Number Systems

ENGIN 112 Intro to Electrical and Computer Engineering

Chapter 1 CSCI

ECE380 Digital Logic. Positional representation

What is Physics? It is a Science

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

CPE100: Digital Logic Design I

How do computers represent numbers?

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

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

CSE 241 Digital Systems Spring 2013

Measuring Time, Space, and Matter. Units of Measurement

Clinical Chemistry Lecture Guide

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:

Representation of SI Units and Prefixes

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

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.

Serway AP Physics. Chapter 1

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

Table of SI prefixes

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

Unit Conversions. O Keefe - LBHS

Week No. 06: Numbering Systems

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

Appendix: a brief history of numbers

CHAPTER 2 NUMBER SYSTEMS

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

Topics Covered in This Chapter:

ECE260: Fundamentals of Computer Engineering

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

Notes: Measurement and Calculation

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

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

Number Representation and Waveform Quantization

PY1007: Physics for Engineers I

Introduction to digital systems. Juan P Bello

International System of Units (SI)

ECE 372 Microcontroller Design

Chapter 4 Number Representations

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

of Digital Electronics

Additional Formula Sheet for Final Exam

MET 487 Instrumentation and Automatic Control. Lecture 3

Lecture notes on * Measurement and Error * Least Square Fitting

Introduction to the World of Energy

CLASS 11th. Mole Concept

Review of Fundamental Mathematics, Measurement & Graphing Techniques

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

CPE100: Digital Logic Design I

THE METRIC SYSTEM. International System of Units SI

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

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

LECTURE 4 - Units Used in Measurements

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

Physics 11. Unit 1 Mathematical Toolkits

Formula Sheet for Exam #2

How to express a number in terms of scientific notation: Examples: Consider the numbers 360,000 and :

Unit 2 Physical Quantities & Measuring Length

Today is Thursday, February 11 th, 2016

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

Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary.

Nanoscale Chemical Characterization: Moving to 3 Dimensions

Conversions between Decimal and Binary

International System of Units (SI)

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

Chapter 2 Measurements & Calculations. Quantity: A thing that can be measured. ex. Length (6.3 ft), mass (35 kg), and time (7.2 s)

Chapter 1. Chapter 1

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

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

Chapter 1: Describing the Physical Universe

PHYSICS 1 REVIEW PACKET

Be on time Switch off mobile phones. Put away laptops. Being present = Participating actively

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

Accelerated Chemistry Study Guide What is Chemistry? (Chapter 1)

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/cpe2210spring2018 22 January 2018 rev. 18.0 2014 2018 Egemen K. Çetinkaya

Number Systems Outline Signals and representations Number systems Summary 22 January 2018 MST CPE2210 Number Systems 2

value Egemen K. Çetinkaya 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 time Possible values: 1.00, 1.01, 2.0000009,... infinite possibilities 22 January 2018 MST CPE2210 Number Systems 3

value Egemen K. Çetinkaya 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 4 3 2 1 0 time Possible values: 0, 1, 2, 3, or 4. That s it. 22 January 2018 MST CPE2210 Number Systems 4

value Egemen K. Çetinkaya 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 Embedded systems: for a particular purpose 1 0 time 22 January 2018 MST CPE2210 Number Systems 5

Why binary system? Digital Systems Representations 22 January 2018 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 22 January 2018 MST CPE2210 Number Systems 7

Digital-Analog Conversion ADC (A2D) and DAC (D2A) Egemen K. Çetinkaya 22 January 2018 MST CPE2210 Number Systems 8

Digital vs. Analog Pros and Cons What are the pros and cons of analog vs. digital? 22 January 2018 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 22 January 2018 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 J 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 22 January 2018 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 22 January 2018 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? 22 January 2018 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 22 January 2018 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 8 0 1 whole part fractional part radix (decimal) point 22 January 2018 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 22 January 2018 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 22 January 2018 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 22 January 2018 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 = 22 January 2018 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 22 January 2018 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 22 January 2018 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 22 January 2018 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 22 January 2018 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 22 January 2018 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 22 January 2018 MST CPE2210 Number Systems 25

Number System Conversion Hex to Binary Examples Egemen K. Çetinkaya 22 January 2018 MST CPE2210 Number Systems 26

Number System Conversion Binary to Hex Examples Egemen K. Çetinkaya 22 January 2018 MST CPE2210 Number Systems 27

Number System Conversion Hex to Decimal Examples Egemen K. Çetinkaya 22 January 2018 MST CPE2210 Number Systems 28

Number System Conversion Decimal to Hex Examples Egemen K. Çetinkaya 22 January 2018 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 22 January 2018 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 22 January 2018 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 22 January 2018 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 22 January 2018 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 22 January 2018 MST CPE2210 Number Systems 34

References and Further Reading [V2011] Frank Vahid, Digital Design with RTL Design, VHDL, and Verilog, 2nd edition, Wiley, 2011. [S2017] John Seiffertt, Digital Logic for Computing, 1st edition, Springer, 2017. 22 January 2018 MST CPE2210 Number Systems 35

End of Foils 22 January 2018 MST CPE2210 Number Systems 36