Lecture 2: Number Systems
|
|
- Jennifer Whitehead
- 6 years ago
- Views:
Transcription
1 Lecture 2: Number Systems Syed M. Mahmud, Ph.D ECE Department Wayne State University Original Source: Prof. Russell Tessier of University of Massachusetts Aby George of Wayne State University
2 Contents Number systems Binary arithmetic Number-base conversion Complement of numbers Binary Coded Decimal & Gray Code Logic operations Chapter 1 ECE 2610 Digital Logic 1 2
3 Number System Decimal System It has 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 It's also known as Base 10 or Radix 10 system Integer (273) 10 = = 2* * *10 0 Fraction (0.526) 10 = = 5* * *10-3 Chapter 1
4 Decimal System (543.67) 10 = 5* * * * *10-2 ( ) 10 = 2* * * * * * * *10-4 Why do we use 10 digits, anyway? Chapter 1
5 Binary System It has 2 digits: 0 and 1 It's also known as Base 2 or Radix 2 system A computer does all of its calcualtions using Binary System A 0 is analogous to a Switch is OFF A 1 is analogous to a Switch is ON A Binary Digits is call a BIT (Binary digit) A group of 8 Bits is called a Byte Examples: , , , etc. A group of 4 Bits is called a Nibble Examples: 1101, 0010, 1011, 0001, 1000, 1101, etc. Chapter 1 5
6 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
7 Binary System Conversion from Binary to Decimal (101.11) 2 = 1* *2 1 +1* *2-1 +1*2-2 = /2 + 1/4 = = (5.75) 10 Chapter 1 7
8 Octal System It has 8 digits: 0, 1, 2, 3, 4, 5, 6, 7 It's also known as Base 8 or Radix 8 system Conversion from Octal to Decimal (431.65) 8 = 4* *8 1 +1* *8-1 +5*8-2 = 4*64 + 3* /8 + 5/64 = ( ) 10 Chapter 1 8
9 Hexadecimal System It has 16 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F It's also known as Base 16 or Radix 16 system Conversion from Hexadecimal to Decimal (A2B.DB) 16 = 10* * * * *16-2 = 10* * / /256 = ( ) 10 Chapter 1 9
10 Example: Any radix to Decimal Conversion Chapter 1 ECE 2610 Digital Logic 1 10
11 Conversion Between Number Bases Octal(base 8) Decimal(base 10) Binary(base 2) Learn to convert between bases. Already demonstrated how to convert from binary to decimal. Hexadecimal (base16)
12 Convert an Integer from Decimal to Another Base For each digit position: 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. Example for (13) 10: Integer Quotient Remainder Coefficient 13/2 = a 0 = 1 6/2 = a 1 = 0 3/2 = a 2 = 1 1/2 = a 3 = 1 Answer (13) 10 = (a 3 a 2 a 1 a 0 ) 2 = (1101) 2
13 Convert a Fraction from Decimal to Another Base For each digit position: 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. Example for (0.625) 10: Integer Fraction Coefficient x 2 = a -1 = x 2 = a -2 = x 2 = a -3 = 1 Answer (0.625) 10 = (0.a -1 a -2 a -3 ) 2 = (0.101) 2
14 Powers of Two Chapter 1 ECE 2610 Digital Logic 1 14
15 Numbers with Different Bases Chapter 1 ECE 2610 Digital Logic 1
16 Binary Addition Binary addition is very simple. This is best shown in an example of adding two binary numbers carries
17 Binary Subtraction We can also perform subtraction (with borrows in place of carries). Let s subtract (10111) 2 from ( ) borrows
18 Binary Multiplication Binary multiplication is much the same as decimal multiplication, except that the multiplication operations are much simpler X
19 Binary Division 25/ Chapter 1 ECE 2610 Digital Logic 1 19
20 Convert an Integer from Decimal to Octal For each digit position: 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. Example for (175) 10: Integer Quotient Remainder Coefficient 175/8 = a 0 = 7 21/8 = a 1 = 5 2/8 = a 2 = 2 Answer (175) 10 = (a 2 a 1 a 0 ) 2 = (257) 8
21 Convert a Fraction from Decimal to Octal For each digit position: 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. Example for (0.3125) 10: Integer Fraction Coefficient x 8 = a -1 = x 8 = a -2 = 4 Answer (0.3125) 10 = (0.24) 8
22 Number Base Conversion - More Examples Chapter 1 ECE 2610 Digital Logic 1 22
23 Number Base Conversion - More Examples.5 x x x Chapter 1 ECE 2610 Digital Logic 1 23
24 Number Base Conversion - More Examples.513 x x x x Chapter 1 ECE 2610 Digital Logic 1 24
25 Octal and Hexadecimal Numbers ( ) 2 ( ) 8 ( ) 2 (2 C 6 B. F 0) 8 Chapter 1 ECE 2610 Digital Logic 1 25
26 Octal and Hexadecimal Numbers Octal to Binary ( ) 8 ( ) 2 Binary to Hexadecimal ( D) 16 ( ) 2 Chapter 1 ECE 2610 Digital Logic 1 26
27 How To Represent Signed Numbers Consider signed magnitude: = = Sign bit Magnitude Sign bit Magnitude
28 One s Complement Representation The one s complement of a binary number involves inverting all bits. 1 s comp of is s comp of is For an n bit number N the 1 s complement is (2 n -1) N. Called diminished radix complement by Mano since 1 s complement for base (radix 2). To find negative of 1 s complement number take the 1 s complement = = Sign bit Magnitude Sign bit Magnitude
29 Two s Complement Representation The two s complement of a binary number involves inverting all bits and adding 1. 2 s comp of is s comp of is For an n bit number N the 2 s complement is 2 n N. Called radix complement by Mano since 2 s complement for base (radix 2). To find negative of 2 s complement number take the 2 s complement = = Sign bit Magnitude Sign bit Magnitude
30 Two s Complement Shortcuts Algorithm 1 Simply complement each bit and then add 1 to the result. Finding the 2 s complement of ( ) 2 and of its 2 s complement N = [N] = Algorithm 2 Starting with the least significant bit, copy all of the bits up to and including the first 1 bit and then complementing the remaining bits. N = [N] =
31 Finite Number Representation Machines that use 2 s complement arithmetic can represent integers in the range -2 n-1 <= N <= 2 n-1-1 where n is the number of bits available for representing N. Note that 2 n-1-1 = ( ) 2 and 2 n-1 = ( ) 2 For 2 s complement more negative numbers than positive. For 1 s complement two representations for zero. For an n bit number in base (radix) z there are z n different unsigned values. (0, 1, z n-1 )
32 1 s Complement Addition Using 1 s complement numbers, adding numbers is easy. For example, suppose we wish to add +( ) 2 and +( ) 2. Let s compute (12) 10 + (1) 10. (12) 10 = +( ) 2 = in 1 s comp. (1) 10 = +( ) 2 = in 1 s comp Add Step 1: Add binary numbers Step 2: Add carry to low-order bit Add carry Final Result
33 1 s Complement Subtraction Using 1 s complement numbers, subtracting numbers is also easy. For example, suppose we wish to subtract +( ) 2 from +( ) 2. Let s compute (12) 10 - (1) 10. (12) 10 = +( ) 2 -(1) 10 = -( ) 2 = in 1 s comp. = in 1 s comp. Step 1: Take 1 s complement of 2 nd operand Step 2: Add binary numbers Step 3: Add carry to low order bit 1 s comp Add Add carry Final Result
34 2 s Complement Addition Using 2 s complement numbers, adding numbers is easy. For example, suppose we wish to add +( ) 2 and +( ) 2. Let s compute (12) 10 + (1) 10. (12) 10 = +( ) 2 = in 2 s comp. (1) 10 = +( ) 2 = in 2 s comp Add Step 1: Add binary numbers Step 2: Ignore carry bit Final Result Ignore
35 2 s Complement Subtraction Using 2 s complement numbers, follow steps for subtraction For example, suppose we wish to subtract +( ) 2 from +( ) 2. Let s compute (12) 10 - (1) 10. (12) 10 = +( ) 2 -(1) 10 = -( ) 2 = in 2 s comp. = in 2 s comp. Step 1: Take 2 s complement of 2 nd operand Step 2: Add binary numbers Step 3: Ignore carry bit Add Final Result s comp Ignore Carry
36 2 s Complement Subtraction: Example #2 Let s compute (13) 10 (5) 10. (13) 10 = +( ) 2 -(5) 10 = -( ) 2 Adding these two 8-bit codes ignore carry = in 2's comp = in 2's comp Discarding the carry bit, the sign bit is seen to be zero, indicating a correct result. Indeed, ( ) 2 = +(8)
37 2 s Complement Subtraction: Example #3 Let s compute (5) 10 (12) 10. (5) 10 -(12) 10 = +( ) 2 = in 2 s comp. = -( ) 2 = in 2 s comp. Adding these two 8-bit codes Here, there is no carry bit and the sign bit is 1. This indicates a negative result, which is what we expect. ( ) 2 = -( ) = -(7) 10.
38 Signed binary numbers Leftmost bit of the signed binary number represents the sign. 0 -> Positive 1 -> Negative Chapter 1 ECE 2610 Digital Logic 1 38
39 Binary Coded Decimal Code (BCD) Chapter 1 ECE 2610 Digital Logic 1 39
40 Gray Code The advantage of the Gray code over the straight binary number sequence is that only one bit in the code group changes in going from one number to the next Chapter 1 ECE 2610 Digital Logic 1 40
41 ASCII Code American Standard Code for Information Interchange ASCII is a 7-bit code, frequently used with an 8 th bit for error detection (more about that in a bit). Character ASCII (bin) ASCII (hex) Decimal Octal A B C Z a 1
42 ASCII Codes and Data Transmission ASCII Codes A Z (26 codes), a z (26 codes) 0-9 (10 codes), others (@#$%^&*.) Complete listing in Mano text Transmission susceptible to noise Typical transmission rates (1500 Kbps, 56.6 Kbps) How to keep data transmission accurate?
43 Parity Codes Parity codes are formed by concatenating a parity bit, P to each code word of C. In an odd-parity code, the parity bit is specified so that the total number of ones is odd. In an even-parity code, the parity bit is specified so that the total number of ones is even. P Information Bits Added even parity bit Added odd parity bit
44 Parity Code Example Concatenate a parity bit to the ASCII code for the characters 0, X, and = to produce both odd-parity and even-parity codes. Character ASCII Odd-Parity ASCII Even-Parity ASCII X =
45 Other Codes 2421 decimal code Excess-3 decimal code 8,4,-2,-1 decimal code American Standard Code for Information Interchange (ASCII) character code Error detecting codes odd parity, even parity Read section 1.7 Chapter 1 ECE 2610 Digital Logic 1 45
46 Binary Data Storage Binary cells store individual bits of data Multiple cells form a register. Data in registers can indicate different values Hex (decimal) BCD ASCII Binary Cell
47 Register Transfer Data can move from register to register. Digital logic used to process data We will learn to design this logic Register A Register B Digital Logic Circuits Register C
48 Transfer of Information Data input at keyboard Shifted into place Stored in memory NOTE: Data input in ASCII
49 Building a Computer We need processing We need storage We need communication You will learn to use and design these components.
50 Binary logic - NOT operation Student took 2610 Student did not take 2610 Student in ECE Chapter 1 ECE 2610 Digital Logic 1 50
51 Binary logic - AND operation Student took 2610 Student took 2610 AND 3300 Student took 3300 Student in ECE Chapter 1 ECE 2610 Digital Logic 1 51
52 Binary logic - OR operation Student took 2610 Student took 2610 OR 3300 Student took 3300 Student in ECE Chapter 1 ECE 2610 Digital Logic 1 52
53 Logic symbols and truth table Chapter 1 ECE 2610 Digital Logic 1 53
54 Input output signals for gates Chapter 1 ECE 2610 Digital Logic 1 54
55 Summary How to convert between binary, octal, decimal, and hexadecimal numbers? How to do the binary arithmetic operations? How to find the 1 s complement of a binary number? How to find the 2 s complement of a binary number? How to do the subtraction operation using 2 s complement method? What are the basic binary logic operations? Chapter 1 ECE 2610 Digital Logic 1 55
56 Homework 1 (Chapter 1) Number system 1.4, 1.8, 1.13 Add, subtract, and multiply in binary: (a) 1111 and 1010 (b) and (c) and Binary arithmetic 1.14, 1.18 Binary codes Convert the following decimal numbers to binary number, Gray code and BCD a) (25) 10 b) (58) 10 Convert the following Gray code numbers to binary numbers a) b) Chapter 1 ECE 2610 Digital Logic 1 56
BINARY SYSTEM. Binary system is used in digital systems because it is:
CHAPTER 2 CHAPTER CONTENTS 2.1 Binary System 2.2 Binary Arithmetic Operation 2.3 Signed & Unsigned Numbers 2.4 Arithmetic Operations of Signed Numbers 2.5 Hexadecimal Number System 2.6 Octal Number System
More informationSE311: Design of Digital Systems
SE311: Design of Digital Systems Lecture 3: Complements and Binary arithmetic Dr. Samir Al-Amer (Term 041) SE311_Lec3 (c) 2004 AL-AMER ١ Outlines Complements Signed Numbers Representations Arithmetic Binary
More informationLogic Circuits I ECE 1411 Thursday 4:45pm-7:20pm. Nathan Pihlstrom.
Logic Circuits I ECE 1411 Thursday 4:45pm-7:20pm Nathan Pihlstrom www.uccs.edu/~npihlstr My Background B.S.E.E. from Colorado State University M.S.E.E. from Colorado State University M.B.A. from UCCS Ford
More informationCHW 261: Logic Design
CHW 261: Logic Design Instructors: Prof. Hala Zayed Dr. Ahmed Shalaby http://www.bu.edu.eg/staff/halazayed14 http://bu.edu.eg/staff/ahmedshalaby14# Slide 1 Slide 2 Slide 3 Digital Fundamentals CHAPTER
More informationDigital Systems and Binary Numbers
Digital Systems and Binary Numbers Prof. Wangrok Oh Dept. of Information Communications Eng. Chungnam National University Prof. Wangrok Oh(CNU) 1 / 51 Overview 1 Course Summary 2 Binary Numbers 3 Number-Base
More informationCS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq
CS 121 Digital Logic Design Chapter 1 Teacher Assistant Hadeel Al-Ateeq Announcement DON T forgot to SIGN your schedule OR you will not be allowed to attend next lecture. Communication Office hours (8
More informationDigital Systems and Binary Numbers
Digital Systems and Binary Numbers Mano & Ciletti Chapter 1 By Suleyman TOSUN Ankara University Outline Digital Systems Binary Numbers Number-Base Conversions Octal and Hexadecimal Numbers Complements
More informationLecture (02) Operations on numbering systems
Lecture (02) Operations on numbering systems By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU : Spring 2018, CSE202 Logic Design I Complements of a number Complements are used in digital computers to simplify
More informationKorea University of Technology and Education
MEC52 디지털공학 Binary Systems Jee-Hwan Ryu School of Mechanical Engineering Binary Numbers a 5 a 4 a 3 a 2 a a.a - a -2 a -3 base or radix = a n r n a n- r n-...a 2 r 2 a ra a - r - a -2 r -2...a -m r -m
More informationDigital Fundamentals
Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Decimal Numbers The position of each digit in a weighted
More informationNumber System. Introduction. Decimal Numbers
Number System Introduction Number systems provide the basis for all operations in information processing systems. In a number system the information is divided into a group of symbols; for example, 26
More informationNumber Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010
Contents Number systems and conversion Binary arithmetic Representation of negative numbers Addition of two s complement numbers Addition of one s complement numbers Binary s Readings Unit.~. UNIT NUMBER
More informationChapter 1. Digital Systems and Binary Numbers
Chapter 1. Digital Systems and Binary Numbers Tong In Oh 1 1.1 Digital Systems Digital age Characteristic of digital system Generality and flexibility Represent and manipulate discrete elements of information
More informationDIGITAL SYSTEM DESIGN
DIGITAL SYSTEM DESIGN UNIT I: Introduction to Number Systems and Boolean Algebra Digital and Analog Basic Concepts, Some history of Digital Systems-Introduction to number systems, Binary numbers, Number
More informationUNIT 7A Data Representation: Numbers and Text. Digital Data
UNIT 7A Data Representation: Numbers and Text 1 Digital Data 10010101011110101010110101001110 What does this binary sequence represent? It could be: an integer a floating point number text encoded with
More informationNumbering systems. Dr Abu Arqoub
Numbering systems The decimal numbering system is widely used, because the people Accustomed (معتاد) to use the hand fingers in their counting. But with the development of the computer science another
More informationMoodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System
Moodle 1 WILLINGDON COLLEGE SANGLI ELECTRONICS (B. Sc.-I) Introduction to Number System E L E C T R O N I C S Introduction to Number System and Codes Moodle developed By Dr. S. R. Kumbhar Department of
More informationDigital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes
Digital Fundamentals CHAPTER 2 Number Systems, Operations, and Codes Decimal Numbers The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 The decimal numbering system has a base of
More informationin this web service Cambridge University Press
978-0-51-85748- - Switching and Finite Automata Theory, Third Edition Part 1 Preliminaries 978-0-51-85748- - Switching and Finite Automata Theory, Third Edition CHAPTER 1 Number systems and codes This
More informationCHAPTER 2 (b) : AND CODES
DKT 122 / 3 DIGITAL SYSTEMS 1 CHAPTER 2 (b) : NUMBER SYSTEMS OPERATION AND CODES m.rizal@unimap.edu.my sitizarina@unimap.edu.my DECIMAL VALUE OF SIGNED NUMBERS SIGN-MAGNITUDE: Decimal values of +ve & -ve
More informationMACHINE LEVEL REPRESENTATION OF DATA
MACHINE LEVEL REPRESENTATION OF DATA CHAPTER 2 1 Objectives Understand how integers and fractional numbers are represented in binary Explore the relationship between decimal number system and number systems
More informationPositional Number System
Positional Number System A number is represented by a string of digits where each digit position has an associated weight. The weight is based on the radix of the number system. Some common radices: Decimal.
More information1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
CS 64 Lecture 2 Data Representation Reading: FLD 1.2-1.4 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 ) + (1x10 0 ) 1010 10?= 1010 2?= 1
More informationPositional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal
Positional notation Ch.. /continued Conversions between Decimal and Binary Binary to Decimal - use the definition of a number in a positional number system with base - evaluate the definition formula using
More informationChapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc.
Chapter 3: Number Systems and Codes Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc., 5 th edition Decimal System The radix or base of a number system determines
More informationComputer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence
GATE Postal Correspondence Computer Sc. & IT 1 Digital Logic Computer Sciencee & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence Examination Oriented Theory, Practice Set Key concepts,
More informationDigital Systems and Binary Numbers
Digital Systems and Binary Numbers ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Spring, 2018 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Outline
More informationDIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM
COURSE / CODE DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) NUMBER SYSTEM A considerable subset of digital systems deals with arithmetic operations. To understand the
More information9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation
Data Representation II CMSC 313 Sections 01, 02 The conversions we have so far presented have involved only unsigned numbers. To represent signed integers, computer systems allocate the high-order bit
More informationReview of Number Systems
Review of Number Systems The study of number systems is important from the viewpoint of understanding how data are represented before they can be processed by any digital system including a digital computer.
More informationCOMP Overview of Tutorial #2
COMP 1402 Winter 2008 Tutorial #2 Overview of Tutorial #2 Number representation basics Binary conversions Octal conversions Hexadecimal conversions Signed numbers (signed magnitude, one s and two s complement,
More informationCHAPTER V NUMBER SYSTEMS AND ARITHMETIC
CHAPTER V-1 CHAPTER V CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-2 NUMBER SYSTEMS RADIX-R REPRESENTATION Decimal number expansion 73625 10 = ( 7 10 4 ) + ( 3 10 3 ) + ( 6 10 2 ) + ( 2 10 1 ) +(
More informationSWITCHING THEORY AND LOGIC CIRCUITS
SWITCHING THEORY AND LOGIC CIRCUITS COURSE OBJECTIVES. To understand the concepts and techniques associated with the number systems and codes 2. To understand the simplification methods (Boolean algebra
More informationLOGIC DESIGN. Dr. Mahmoud Abo_elfetouh
LOGIC DESIGN Dr. Mahmoud Abo_elfetouh Course objectives This course provides you with a basic understanding of what digital devices are, how they operate, and how they can be designed to perform useful
More informationBinary. Hexadecimal BINARY CODED DECIMAL
Logical operators Common arithmetic operators, like plus, minus, multiply and divide, works in any number base but the binary number system provides some further operators, called logical operators. Meaning
More informationECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014
Problem 1 (4 parts, 21 points) Encoders and Pass Gates Part A (8 points) Suppose the circuit below has the following input priority: I 1 > I 3 > I 0 > I 2. Complete the truth table by filling in the input
More informationCHAPTER TWO. Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER
1 CHAPTER TWO Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER 2-1 Data Types 2-2 Complements 2-3 Fixed-Point Representation 2-4 Floating-Point Representation
More informationComputer Organization
Computer Organization Register Transfer Logic Number System Department of Computer Science Missouri University of Science & Technology hurson@mst.edu 1 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5,
More informationEE292: Fundamentals of ECE
EE292: Fundamentals of ECE Fall 2012 TTh 10:00-11:15 SEB 1242 Lecture 22 121115 http://www.ee.unlv.edu/~b1morris/ee292/ 2 Outline Review Binary Number Representation Binary Arithmetic Combinatorial Logic
More informationChapter 1 Review of Number Systems
1.1 Introduction Chapter 1 Review of Number Systems Before the inception of digital computers, the only number system that was in common use is the decimal number system which has a total of 10 digits
More informationChapter 2. Data Representation in Computer Systems
Chapter 2 Data Representation in Computer Systems Chapter 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers. Master the skill of converting
More informationBinary Codes. Dr. Mudathir A. Fagiri
Binary Codes Dr. Mudathir A. Fagiri Binary System The following are some of the technical terms used in binary system: Bit: It is the smallest unit of information used in a computer system. It can either
More informationChapter 2 Data Representations
Computer Engineering Chapter 2 Data Representations Hiroaki Kobayashi 4/21/2008 4/21/2008 1 Agenda in Chapter 2 Translation between binary numbers and decimal numbers Data Representations for Integers
More informationNumber codes nibble byte word double word
Codes Number codes Digital circuits (like processors) represent information with two-valued binary codes. Why? Every signal wire in a digital system can transport one binary digit, or bit. A signal at
More informationChapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude
Chapter 2 Positional number systems A positional number system represents numeric values as sequences of one or more digits. Each digit in the representation is weighted according to its position in the
More informationMs Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction
Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES Structure 2.1 Introduction 2.2 Objectives 2.3 Binary Numbers 2.3.1 Binary-to-Decimal conversion 2.3.2 Decimal-to-Binary Conversion 2.4 Octal Numbers
More informationLevel ISA3: Information Representation
Level ISA3: Information Representation 1 Information as electrical current At the lowest level, each storage unit in a computer s memory is equipped to contain either a high or low voltage signal Each
More informationBinary Systems and Codes
1010101010101010101010101010101010101010101010101010101010101010101010101010101010 1010101010101010101010101010101010101010101010101010101010101010101010101010101010 1010101010101010101010101010101010101010101010101010101010101010101010101010101010
More informationElectronic Data and Instructions
Lecture 2 - The information Layer Binary Values and Number Systems, Data Representation. Know the different types of numbers Describe positional notation Convert numbers in other bases to base 10 Convert
More informationCHAPTER 2 Data Representation in Computer Systems
CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting
More informationData Representations & Arithmetic Operations
Data Representations & Arithmetic Operations Hiroaki Kobayashi 7/13/2011 7/13/2011 Computer Science 1 Agenda Translation between binary numbers and decimal numbers Data Representations for Integers Negative
More informationChapter 2 Number Systems and Codes Dr. Xu
Chapter 2 Number Systems and Codes Dr. Xu Chapter 2 Objectives Selected areas covered in this chapter: Converting between number systems. Decimal, binary, hexadecimal. Advantages of the hexadecimal number
More informationExcerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997
Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997 APPENDIX A.1 Number systems and codes Since ten-fingered humans are addicted to the decimal system, and since computers
More informationCHAPTER 2 Data Representation in Computer Systems
CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting
More informationFundamentals of Programming (C)
Borrowed from lecturer notes by Omid Jafarinezhad Fundamentals of Programming (C) Group 8 Lecturer: Vahid Khodabakhshi Lecture Number Systems Department of Computer Engineering Outline Numeral Systems
More informationCS & IT Conversions. Magnitude 10,000 1,
CS & IT Conversions There are several number systems that you will use when working with computers. These include decimal, binary, octal, and hexadecimal. Knowing how to convert between these number systems
More informationD I G I T A L C I R C U I T S E E
D I G I T A L C I R C U I T S E E Digital Circuits Basic Scope and Introduction This book covers theory solved examples and previous year gate question for following topics: Number system, Boolean algebra,
More informationAdvanced Computer Architecture-CS501
Advanced Computer Architecture Lecture No. 34 Reading Material Vincent P. Heuring & Harry F. Jordan Chapter 6 Computer Systems Design and Architecture 6.1, 6.2 Summary Introduction to ALSU Radix Conversion
More informationDigital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer.
Digital Logic 1 Data Representations 1.1 The Binary System The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. The system we
More informationNumber representations
Number representations Number bases Three number bases are of interest: Binary, Octal and Hexadecimal. We look briefly at conversions among them and between each of them and decimal. Binary Base-two, or
More informationIT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1
IT 1204 Section 2.0 Data Representation and Arithmetic 2009, University of Colombo School of Computing 1 What is Analog and Digital The interpretation of an analog signal would correspond to a signal whose
More informationDigital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals
Digital Systems COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Welcome to COE 202 Course Webpage: http://faculty.kfupm.edu.sa/coe/mudawar/coe202/ Lecture
More informationEEM336 Microprocessors I. Arithmetic and Logic Instructions
EEM336 Microprocessors I Arithmetic and Logic Instructions Introduction We examine the arithmetic and logic instructions. The arithmetic instructions include addition, subtraction, multiplication, division,
More informationECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationT02 Tutorial Slides for Week 2
T02 Tutorial Slides for Week 2 ENEL 353: Digital Circuits Fall 2017 Term Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary 19 September, 2017
More informationELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds.
ECE-78: Digital Logic Design Fall 6 UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers
More informationChapter 2. Data Representation in Computer Systems
Chapter 2 Data Representation in Computer Systems Chapter 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers. Master the skill of converting
More informationLecture (03) Binary Codes Registers and Logic Gates
Lecture (03) Binary Codes Registers and Logic Gates By: Dr. Ahmed ElShafee Binary Codes Digital systems use signals that have two distinct values and circuit elements that have two stable states. binary
More informationMYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes
DATA REPRESENTATION Data Types Complements Fixed Point Representations Floating Point Representations Other Binary Codes Error Detection Codes Hamming Codes 1. DATA REPRESENTATION Information that a Computer
More informationData Representation COE 301. Computer Organization Prof. Muhamed Mudawar
Data Representation COE 30 Computer Organization Prof. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals Presentation Outline Positional Number
More informationP( Hit 2nd ) = P( Hit 2nd Miss 1st )P( Miss 1st ) = (1/15)(15/16) = 1/16. P( Hit 3rd ) = (1/14) * P( Miss 2nd and 1st ) = (1/14)(14/15)(15/16) = 1/16
CODING and INFORMATION We need encodings for data. How many questions must be asked to be certain where the ball is. (cases: avg, worst, best) P( Hit 1st ) = 1/16 P( Hit 2nd ) = P( Hit 2nd Miss 1st )P(
More informationP( Hit 2nd ) = P( Hit 2nd Miss 1st )P( Miss 1st ) = (1/15)(15/16) = 1/16. P( Hit 3rd ) = (1/14) * P( Miss 2nd and 1st ) = (1/14)(14/15)(15/16) = 1/16
CODING and INFORMATION We need encodings for data. How many questions must be asked to be certain where the ball is. (cases: avg, worst, best) P( Hit 1st ) = 1/16 P( Hit 2nd ) = P( Hit 2nd Miss 1st )P(
More informationMicrocomputers. Outline. Number Systems and Digital Logic Review
Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded
More informationDigital Fundamentals
Digital Fundamentals Tenth Edition Floyd Chapter 1 Modified by Yuttapong Jiraraksopakun Floyd, Digital Fundamentals, 10 th 2008 Pearson Education ENE, KMUTT ed 2009 Analog Quantities Most natural quantities
More informationIntroduction to Computers and Programming. Numeric Values
Introduction to Computers and Programming Prof. I. K. Lundqvist Lecture 5 Reading: B pp. 47-71 Sept 1 003 Numeric Values Storing the value of 5 10 using ASCII: 00110010 00110101 Binary notation: 00000000
More informationRui Wang, Assistant professor Dept. of Information and Communication Tongji University.
Data Representation ti and Arithmetic for Computers Rui Wang, Assistant professor Dept. of Information and Communication Tongji University it Email: ruiwang@tongji.edu.cn Questions What do you know about
More informationplc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums
plc numbers - 3. 3. NUMBERS AND DATA Topics: Number bases; binary, octal,, hexa Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;
More informationCMPE223/CMSE222 Digital Logic Design. Positional representation
CMPE223/CMSE222 Digital Logic Design Number Representation and Arithmetic Circuits: Number Representation and Unsigned Addition Positional representation First consider integers Begin with positive only
More informationChapter 1 Emad Felemban
Chapter 1 Emad Felemban Digital Computers and Digital Systems Binary Numbers Number Base Conversion Octal and Hexadecimal Numbers Complements Singed Binary Numbers Binary Codes Binary Storage and Registers
More informationELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.
UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers of ): DIGIT 3 4 5 6 7 8 9 Number:
More informationData Representation and Binary Arithmetic. Lecture 2
Data Representation and Binary Arithmetic Lecture 2 Computer Data Data is stored as binary; 0 s and 1 s Because two-state ( 0 & 1 ) logic elements can be manufactured easily Bit: binary digit (smallest
More informationECE 20B, Winter Purpose of Course. Introduction to Electrical Engineering, II. Administration
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II Instructor: Andrew B Kahng (lecture) Email: abk@eceucsdedu Telephone: 858-822-4884 office, 858-353-0550 cell Office: 3802 AP&M Lecture: TuThu
More informationCMSC 2833 Lecture 18. Parity Add a bit to make the number of ones (1s) transmitted odd.
Parity Even parity: Odd parity: Add a bit to make the number of ones (1s) transmitted even. Add a bit to make the number of ones (1s) transmitted odd. Example and ASCII A is coded 100 0001 Parity ASCII
More informationElectronics Engineering ECE / E & T
STUDENT COPY DIGITAL ELECTRONICS 1 SAMPLE STUDY MATERIAL Electronics Engineering ECE / E & T Postal Correspondence Course GATE, IES & PSUs Digital Electronics 2015 ENGINEERS INSTITUTE OF INDIA. All Rights
More informationSlide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng
Slide Set 1 for ENEL 339 Fall 2014 Lecture Section 02 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Fall Term, 2014 ENEL 353 F14 Section
More informationCPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS
CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS Aleksandar Milenković The LaCASA Laboratory, ECE Department, The University of Alabama in Huntsville Email: milenka@uah.edu Web:
More informationCPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS
CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS Aleksandar Milenković The LaCASA Laboratory, ECE Department, The University of Alabama in Huntsville Email: milenka@uah.edu Web:
More informationNumber Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as:
N Number Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as: a n a a a The value of this number is given by: = a n Ka a a a a a
More informationLecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture
Points ddressed in this Lecture Lecture 6: Signed Numbers rithmetic Circuits Professor Peter Cheung Department of EEE, Imperial College London (Floyd 2.5-2.7, 6.1-6.7) (Tocci 6.1-6.11, 9.1-9.2, 9.4) Representing
More informationSigned Binary Numbers
Signed Binary Numbers Unsigned Binary Numbers We write numbers with as many digits as we need: 0, 99, 65536, 15000, 1979, However, memory locations and CPU registers always hold a constant, fixed number
More informationSwitching Circuits and Logic Design Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
Switching Circuits and Logic Design Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 02 Octal and Hexadecimal Number Systems Welcome
More informationChapter 2: Number Systems
Chapter 2: Number Systems Logic circuits are used to generate and transmit 1s and 0s to compute and convey information. This two-valued number system is called binary. As presented earlier, there are many
More informationIntroduction to Numbering Systems
NUMBER SYSTEM Introduction to Numbering Systems We are all familiar with the decimal number system (Base 10). Some other number systems that we will work with are Binary Base 2 Octal Base 8 Hexadecimal
More informationChapter 2. Data Representation in Computer Systems. Objectives (1 of 2) Objectives (2 of 2)
Chapter 2 Data Representation in Computer Systems Objectives (1 of 2) Understand the fundamentals of numerical data representation and manipulation in digital computers. Master the skill of converting
More information10.1. Unit 10. Signed Representation Systems Binary Arithmetic
0. Unit 0 Signed Representation Systems Binary Arithmetic 0.2 BINARY REPRESENTATION SYSTEMS REVIEW 0.3 Interpreting Binary Strings Given a string of s and 0 s, you need to know the representation system
More informationModule 2: Computer Arithmetic
Module 2: Computer Arithmetic 1 B O O K : C O M P U T E R O R G A N I Z A T I O N A N D D E S I G N, 3 E D, D A V I D L. P A T T E R S O N A N D J O H N L. H A N N E S S Y, M O R G A N K A U F M A N N
More informationCOE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design
1 COE 0- Digital Logic Number Systems II Dr. Abdulaziz Y. Barnawi COE Department KFUPM COE 0 Logic Design January 3, 016 Objectives Base Conversion Decimal to other bases Binary to Octal and Hexadecimal
More informationChapter 10 Binary Arithmetics
27..27 Chapter Binary Arithmetics Dr.-Ing. Stefan Werner Table of content Chapter : Switching Algebra Chapter 2: Logical Levels, Timing & Delays Chapter 3: Karnaugh-Veitch-Maps Chapter 4: Combinational
More informationBasic Definition INTEGER DATA. Unsigned Binary and Binary-Coded Decimal. BCD: Binary-Coded Decimal
Basic Definition REPRESENTING INTEGER DATA Englander Ch. 4 An integer is a number which has no fractional part. Examples: -2022-213 0 1 514 323434565232 Unsigned and -Coded Decimal BCD: -Coded Decimal
More informationChapter (1) Eng. Mai Z. Alyazji
THE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DIGITAL LOGIC DESIGN DISCUSSION ECOM 2012 Chapter (1) Eng. Mai Z. Alyazji September, 2016 1.1 List the octal and hexadecimal
More information