EE 261 Introduction to Logic Circuits. Module #2 Number Systems


 Hector Riley
 2 years ago
 Views:
Transcription
1 EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook Reading Assignments Practice Problems 2.1, 2.5, 2.6, 2.7, 2.8, 2.11, 2.12 Graded Components of this Module 2 homeworks, 2 discussions, 1 quiz (all online) Page 1
2 EE 261 Introduction to Logic Circuits Module #2 Number Systems What you should be able to do after this module Convert numbers between bases (decimal, binary, octal, hexadecimal) Perform arithmetic (both signed & unsigned) using other bases Create and Decode various binary codes (BCD, Gray, ASCII, Parity) Page 2
3 Number Systems Number System  a system that contains a set of numbers/symbols/characters and at least one operation (+, , ) BASE or RADIX  the number of symbols in the number system  humans use Base10 (why?)  computers use Base2 (why?) Positional Number System  we can represent 10 unique quantities w/ our Base10 system  what if we want more?  we can add a "leading" digit to our number that has increased "weight ex) 0 1 : : Page 3
4 Number Systems Radix Point  place in the string of digits at which numbers represent either whole or fractional. ex) p  Number of digits to the LEFT of the radix point. n  Number of digits to the RIGHT of the radix point. d  Digits in the system, described with a positional subscript (NOTE: if the radix point is missing, we assume it is to the right of the #) r  Radix or Base (Base10, r=10) i  Position  starting at 0  increasing to the left of the radix point  negative to the right of the radix point Weight  each digit has a weight based on its position = r i  we multiply the digit by its weight to find how much value that digit represents Page 4
5 Number Systems Value  the value of a number is the sum of each digit multiplied by its corresponding weight. D i p 1 n i d i r Example: Given the BASE 10 (r=10) number What is p? p=3 What is n? n=1 Write the digit notation? d 2 d 1 d 0. d 1 What is the weight for each position? Show the expanded decimal equivalent? = 3(10 2 ) + 2(10 1 ) +7(10 0 ) + 2(101 ) = Why all this framework? Because this generic format works for all Bases. Page 5
6 Number Systems Binary  A number system with 2 symbols (BASE=2 or r=2).  The symbols are 0 and 1  each symbol is called a "bit"  we ll give a subscript to the number to indicate its base ex) (decimal) (binary)  4 bits are called a "Nibble"  8 bits are called a "Byte"  the leftmost bit in a string is called the Most Significant (MSB) or High Order  the rightmost bit in a string is called the Least Significant (LSB) or Low Order Page 6
7 Number Systems Binary Systems B p 1 i b i r i n Example: Given the Binary number What is p? p=5 What is n? n=0 What is r? r=2 Write the bit notation? b 4 b 3 b 2 b 1 b 0 What is the weight for each position? Show the expanded decimal equivalent? B = 1(2 4 ) + 0(2 3 ) +0(2 2 ) + 1(2 1 ) + 1(2 0 ) = 1(16) + 0(8) + 0(4) + 1(2) +1(1) = Page 7
8 Base Conversions Base  the number of symbols in a number system  we instinctively know decimal  we've talked about Binary (two symbol)  there are other bases of interest in digital systems  the bases we typically care about are powers of 2 (or associated with Binary)  these bases are typically used to represent a lot of "bits" ex) it's hard to describe the value of a 64bit bus in 1's and 0's Octal  A number system with 8 symbols  0,1,2,3,4,5,6,7  each digit in this system is equivalent to 3bits  it is a positional number system ex) 0 1 : : Page 8
9 Base Conversions Hexadecimal  A number system with 16 symbols  we use alphabetic characters as symbols in the set above 90,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F  each digit in this system is equivalent to 4bits  it is a positional number system ex) 0 1 : 9 A B C D E F : 1F 20 : Page 9
10 Base Conversions How the Bases Relate to Each Other Decimal Binary Octal Hexadecimal Base10 Base2 Base8 Base A B C D E F  these are the commonly used bases in digital systems, we'd like to be able to convert between them Page 10
11 Base Conversions Converting to Decimal  we sum the products of each digit value with its positional weight D i p 1 n i d i r  this works for whole and fractional digits  this works for Binary to Decimal  this works for Octal to Decimal  this works for Hex to Decimal Page 11
12 Base Conversions Base Conversion Binary to Decimal  each digit has a weight of r i that depends on the position of the digit  multiply each digit by its weight  sum the resultant products ex) Convert 1011 to decimal (weight) = 1 (2 3 ) + 0 (2 2 ) + 1 (2 1 ) + 1 (2 0 ) = 1 (8) + 0 (4) + 1 (2) + 1 (1) = = 11 Decimal Page 12
13 Base Conversions Base Conversion Binary to Decimal with Fractions  the weight of the binary digits have negative positions ex) Convert to decimal = 1 (2 3 ) + 0 (2 2 ) + 1 (2 1 ) + 1 (2 0 ) + 1 (21 ) + 0 (22 ) + 1 (23 ) = 1 (8) + 0 (4) + 1 (2) + 1 (1) + 1 (0.5) + 0 (0.25) + 1 (0.125) = = Decimal Page 13
14 Base Conversions Base Conversion Hex to Decimal  the same process as binary to decimal except the weights are now BASE 16  NOTE (A=10, B=11, C=12, D=13, E=14, F=15) ex) Convert 2BC from Hex to decimal (weight) 2 B C = 2 (16 2 ) + B (16 1 ) + C (16 0 ) = 2 (256) + 11 (16) + 12 (1) = = 700 Decimal Page 14
15 Base Conversions Base Conversion Hex to Decimal with Fractions  the fractional digits have negative weights (BASE 16)  NOTE (A=10, B=11, C=12, D=13, E=14, F=15) ex) Convert 2BC.F to decimal (weight) 2 B C. F = 2 (16 2 ) + B (16 1 ) + C (16 0 ) + F (161 ) = 2 (256) + 11 (16) + 12 (1) + 15 (0.0625) = = Decimal Page 15
16 Base Conversions Base Conversion Decimal to Binary  the decimal number is divided by 2, the remainder is recorded  the quotient is then divided by 2, the remainder is recorded  the process is repeated until the quotient is zero ex) Convert 11 decimal to binary Quotient Remainder LSB MSB = 1011 binary Page 16
17 Base Conversions Base Conversion Decimal to Binary with Fractions  the fraction is converted to binary separately  the fraction is multiplied by 2, the 0 th position digit is recorded  the remaining fraction is multiplied by 2, the 0 th digit is recorded  the process is repeated until the fractional part is zero ex) Convert decimal to binary Product 0 th Digit MSB LSB finished decimal = binary Page 17
18 Base Conversions Base Conversion Decimal to Hex  the same procedure is used as before but with BASE 16 as the divisor/multiplier ex) Convert decimal to hex 1 st, convert the integer part Quotient Remainder LSB MSB 2 nd, convert the fractional part = 1A4 Product 0 th Digit MSB decimal = 1A4.A hexadecimal = 0.A Page 18
19 Base Conversions Base Conversion Octal to Decimal / Decimal to Octal  the same procedure is used as before but with BASE 8 as the divisor/multiplier Page 19
20 Base Conversions Base Conversion of "Powers of 2"  converting bases that are powers of 2 are simple due to straight forward mapping  An Octal digital represents 3 bits  A Hex digit represents 4 bits Page 20
21 Base Conversions Converting Binary to Hexadecimal  every 4 binary bits represents one HEX digit  begin the groups of four at the LSB  if necessary, fill with leading 0 s to form the groups of four ex) Convert from Binary to Hex D 4 Hex, notice that we had to fill with MSB 0's to get groups of four  This works for fractions too. The only difference is that the grouping starts at the Radix Point ex) Convert 0.11 from Binary to Octal C Page 21
22 Base Conversions Converting Binary to Octal  every 3 binary bits represents one OCTAL digit  begin the groups of three at the LSB  if necessary, fill with leading 0 s to form the groups of three ex) Convert from Binary to Octal Octal ex) Convert from Binary to Octal Octal, note we had to fill with 0's on the MSB side Page 22
23 Base Conversions Converting Hex to Binary  each HEX digit is made up of four binary bits ex) Convert ABC Hex to Binary A B C = = Page 23
24 Base Conversions Converting Octal to Binary  each Octal digit is made up of three binary bits ex) Convert 567 Octal to Binary = = Page 24
25 Base Conversions Terminology NIBBLE BYTE = 4 bits = 8 bits  you should be familiar with converting Binary Nibbles to Hex & Dec  there is a table on page 28 of your textbook which lists the basic conversions Page 25
26 Binary Arithmetic Addition and Subtraction  same as BASE 10 math, remember borrows and carries Addition Table Carry Subtraction Table Need to "Borrow" from a more significant bit Page 26
27 Binary Arithmetic Binary Addition  same as BASE 10 addition  need to keep track of the carry bit for a given system size (n), i.e., 4bit, 8bit, 16bit, ex) Add the binary numbers 1011 and Carry Bit Page 27
28 Binary Arithmetic Binary Subtraction  same as BASE 10 subtraction  need to keep track of the borrow bit for a given system size (n), i.e., 4bit, 8bit, 16bit, ex) Subtract the binary numbers 1010 and Borrow bits : if necessary, we could assume a borrow from an even higher significant bit Page 28
29 Signed Numbers Negative Numbers  So far, we've dealt with Positive numbers  The real world has Negative numbers  We need a method to represent negatives in binary  However, our number system doesn't have a "", just 0's and 1's Sign Bit  We will use the MSB to represent a "+" or "" 0 = Positive 1 = Negative Page 29
30 Signed Numbers Signed Magnitude Representation  a negative number system (there is more than one)  uses the MSB as the sign bit  the remaining LSB's represent the number ex) 85 dec = dec = (additional sign bit adds one bit to the number) 85 dec = Is this Efficient?  The number of unique combinations that a number can represents is given by: N = r x N = # of unique combinations x = # of digits in the number (p + n) r = base ex) 2bits: N=2 2 = 4 (00, 01, 10, 11) 7bits: N=2 7 = bits: N=2 8 = 256 Page 30
31 Signed Numbers Signed Magnitude Range  The Range of Signed Magnitude is given by: (2 x11) < N SM < (2 x11) ex) if we use 8bits, the range is: ( ) < N SM < ( ) 127 < N SM < This is only 255 unique numbers  But, if we are using 8bits, there should be 2 8 unique numbers, or 256?  This is because in Signed Magnitude, there are two representations for Zero = = 0 Page 31
32 Signed Numbers Advantages of Signed Magnitude  Very easy to understand and use  the binary number is simply represented in binary, then a sign bit is added Disadvantages of Signed Magnitude Representation  We loose a possible number by having +0, and This also creates a gap in our number list, which makes simple math harder  Addition/Subtraction in general are more difficult Algorithm : if ( signs are the same)  add and give same sign else if (signs are different)  compare magnitudes  subtract smaller from larger  give the result the sign of larger number Page 32
33 Signed Numbers Complement Numbers  Complementing a Binary Number means: 0 changes to 1 1 changes to 0  using this technique, number can be a "complemented" to find the negative representation, then the arithmetic becomes much simpler  the ones we care about are 1) "Radix Complement" (2's complement for binary) 2) "1's Complement Page 33
34 Signed Numbers Radix Complement  i.e., 10's complement, 2's complement  Technique to get the Radix Complement:  subtract current number from r x D rcomp = r n  D orig  Rules:  The MSB is still the sign bit (0="+", 1="")  Now that we're subtracting, we can't have arbitrary number of bits x is predetermined and fixed  A simpler method is : 1) Complement all digits in D orig 2) Add 1 to the result, ignore any carryout Page 34
35 Signed Numbers 2's Complement  this is Radix Complement on a BASE2 number system  straight forward to use the "complement and add 1" technique ex) Give the 8bit, 2's complement representation of = (Notice that the MSB is the sign bit, 0=+) Step 1: (we first complement all bits) Step 2: + 1 (we then add 1) (Notice the Sign Bit is negative)  these 8bits represent in 2's complement Page 35
36 Signed Numbers 2's Complement Checking  We can convert back to find Original magnitude and do checking ex) Give the 8bit, 2's complement representation of = 's Comp (Notice that the MSB is the sign bit, 1="") Step 1: (we first complement all bits) Step 2: + 1 (we then add 1) (Notice the Sign Bit is positive)  these 8bits represent ,Which is what we originally started with, Page 36
37 Signed Numbers 2's Complement Range  We need to know how many numbers we can represent using this system  Notice that we are still using a bit for the sign  BUT, we don't duplicate Zero in this system ex) = = The Range of 2's Comp is given by: (2 x1 ) < N 2Comp < (2 x11) ex) if we use 8bits, the range is: (2 81 ) < N 2Comp < ( ) 128 < N 2Comp < There are now 256 unique numbers, this is a more efficient use of bits Page 37
38 Signed Numbers 1's Complement  In 2's complement, the codes are asymmetric Lowest 2's Comp # = Comp = Highest 2's Comp # = Comp = This is good because we have all 256 possible numbers that 8bits can give us  1's Comp is similar, but it gives us symmetry around Zero  To find the 1's Comp, we subtract current number from (r x 1) D 1Comp = (r n 1)  D orig Page 38
39 Signed Numbers 1's Complement  Or we can use the simple way 1) Complement all the #'s (Don't add 1) ex) Give the 8bit, 1's complement representation of = (Notice that the MSB is the sign bit, 0=+) Step 1: Comp (complement all bits) Page 39
40 Signed Numbers 1's Complement Range  The Range of 1's Complement is given by: (2 x11) < N SM < (2 x11)  Once again, we have two values for Zero = = 0 Page 40
41 Signed Numbers Negative Representation  We have covered 3 different "signed" codes  You need to KNOW THE CODE you are using ex) Represent ) Signed Magnitude : SM 2) 2's Complement : Comp 3) 1's Complement : Comp Page 41
42 Signed Arithmetic Two s Compliment Arithmetic  Two's complement has advantages when going into Hardware  Two's complement addition is straight forward because the numbers are in sequential order (+1) from their least significant ( ) to their most significant ( )  There is only one value for Zero, so "avoiding the gap" isn't necessary Page 42
43 Signed Arithmetic Two s Compliment Addition  Addition of two s compliment numbers is performed just like standard binary addition.  However, the carry bit is ignored Page 43
44 Signed Arithmetic Two s Compliment Subtraction  We can build a subtraction circuit out of the same hardware as an adder  2's Comp inherently adds negative numbers so  to subtract, we can just complement one number, and add it. ex) Subtract 8dec from 15dec 15dec = dec = > two s compliment > invert add = 8dec Now Add: 15 + (8) = % % = 7dec Disregard Carry Page 44
45 Signed Arithmetic Two s Compliment Overflow  If a two s compliment arithmetic operation results in a number that is outside the range of representation (i.e., 8bits : 128 < N < +127), an overflow has occurred. ex) 100dec 100dec = 200dec (can t represent)  There are three cases when overflow occurs 1) Sum of like signs results in answer with opposite sign 2) Negative Positive = Positive 3) Positive Negative = Negative  Boolean logic can be used to detect these situations. Page 45
46 Signed Arithmetic Remember 2's Comp Range  The Range of 2's Comp is given by: (2 x1 ) < N 2Comp < (2 x11) ex) if we use 8bits, the range is: (2 81 ) < N 2Comp < ( ) 128 < N 2Comp < +127 What goes on in real Hardware?  A generic, Binary adder circuit is created  the user must be aware of when 2's complement is being used  additional circuitry checks for "Overflow" Page 46
47 Binary Codes Codes  a string of xbits that represent information  we've seen codes already using the binary # system 1) Signed Magnitude 2) 2's Complement 3) 1's Complement  the same information can be encoded differently  it's up to the engineer to KNOW THE CODE that is being used Code Word  the term to represent the discrete string of bits that make up the information ex) 4bit code words in a stream of information word Page 47
48 Binary Codes Binary Coded Decimal (BCD)  Sometimes we wish to represent an individual decimal digit as a binary representation (i.e., 7segment display to eliminate a decoder)  We do this by using 4 binary digits. Decimal BCD ex) Represent 17dec Binary = BCD = Page 48
49 Binary Codes BCD Addition  If we are using BCD, traditional addition doesn t work. 12 = correct answer in BCD is 20. Traditional addition only considers bit addition carry. In BCD we need to consider 4bit addition carry. 1A  The solution is to add 6 to every sum greater than 9 12 = When a nibble addition results in A or greater, we add A Page 49
50 Binary Codes Gray Code  There are applications where we want to count, but we only want one bit to transition each time we increment counts  Reduce Power & Noise in Digital Electronics  Electromechanical devices  Such a is called a "Gray Code" ex) 3bit Gray Code Decimal Binary Gray Page 50
51 Binary Codes ASCII  American Standard Code for Information Interchange  English Alphanumeric characters are represented with a 7bit code  See Table 211 in text ex) A = $40 a = $61 Page 51
52 Binary Codes Parity Codes  there are times when information can be corrupted during transmission  we can include an "Error Checking" bit along with the original data  this "Error Checking" bit contains additional information about the original data  this can be used by the receiver to monitor whether an error in the data occurred PARITY  the number of 1's in the information are counted,  the parity bit represents whether there are an EVEN or ODD number of 1's EVEN PARITY = 0, if there are an EVEN number of 1's in the information = 1, otherwise ODD PARITY = 0, if there are an ODD number of 1's in the information = 1, otherwise Page 52
53 Binary Codes Parity Example Information EVEN Parity ODD Parity Page 53
54 Module Overview Topics  # systems & bases  # system conversions  to & from decimal  to and from binary/oct/hex  binary arithmetic  addition (carries)  subtraction (borrows)  negative #'s in binary  Signed Magnitude  2's Complement  1's Complement  2's complement arithmetic  complement & add  range & overflow  Codes  BCD, Gray, ASCII, Parity Page 54
الدكتور المھندس عادل مانع داخل
الدكتور المھندس عادل مانع داخل / میسان جامعة / كلیة الھندسة قسم الھندسة الكھرباي یة Chapter 1: Digital Systems Discrete Data Examples: 26 letters of the alphabet (A, B etc) 10 decimal digits (0, 1, 2 etc)
More informationDigital Fundamentals
Digital Fundamentals with PLD Programming Floyd Chapter 2 29 Pearson Education Decimal Numbers The position of each digit in a weighted number system is assigned a weight based on the base or radix of
More informationLogic Design. Dr. Yosry A. Azzam
Logic Design Dr. Yosry A. Azzam Binary systems Chapter 1 Agenda Binary Systems : Binary Numbers, Binary Codes, Binary Logic ASCII Code (American Standard Code for Information Interchange) Boolean Algebra
More informationBy the end of the lecture, you should be able to:
Extra Lecture: Number Systems Objectives  To understand: Base of number systems: decimal, binary, octal and hexadecimal Textual information stored as ASCII Binary addition/subtraction, multiplication
More informationOct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8
ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: Our standard number system is base, also
More informationThe string of digits 101101 in the binary number system represents the quantity
Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for
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 twovalued number system is called binary. As presented earlier, there are many
More informationMT1 Number Systems. In general, the number a 3 a 2 a 1 a 0 in a base b number system represents the following number:
MT1 Number Systems MT1.1 Introduction A number system is a well defined structured way of representing or expressing numbers as a combination of the elements of a finite set of mathematical symbols (i.e.,
More informationHere 4 is the least significant digit (LSD) and 2 is the most significant digit (MSD).
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 informationBinary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.
Binary Representation The basis of all digital data is binary representation. Binary  means two 1, 0 True, False Hot, Cold On, Off We must be able to handle more than just values for real world problems
More informationBinary Representation. Number Systems. Positional Notation
Binary Representation The basis of all digital data is binary representation. Binary  means two 1, 0 True, False Hot, Cold On, Off We must be able to handle more than just values for real world problems
More informationInteger Numbers. The Number Bases of Integers Textbook Chapter 3
Integer Numbers The Number Bases of Integers Textbook Chapter 3 Number Systems Unary, or marks: /////// = 7 /////// + ////// = ///////////// Grouping lead to Roman Numerals: VII + V = VVII = XII Better:
More information2011, The McGrawHill Companies, Inc. Chapter 3
Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through
More informationplc numbers  13.1 Encoded values; BCD and ASCII Error detection; parity, gray code and checksums
plc numbers  3. Topics: Number bases; binary, octal, decimal, hexadecimal Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;
More information1 Basic Computing Concepts (4) Data Representations
1 Basic Computing Concepts (4) Data Representations 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
More informationEncoding Systems: Combining Bits to form Bytes
Encoding Systems: Combining Bits to form Bytes Alphanumeric characters are represented in computer storage by combining strings of bits to form unique bit configuration for each character, also called
More informationLSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology
LSN 2 Number Systems Department of Engineering Technology LSN 2 Decimal Number System Decimal number system has 10 digits (09) Base 10 weighting system... 10 5 10 4 10 3 10 2 10 1 10 0. 101 102 103
More information2.1 Binary Numbers. 2.3 Number System Conversion. From Binary to Decimal. From Decimal to Binary. Section 2 Binary Number System Page 1 of 8
Section Binary Number System Page 1 of 8.1 Binary Numbers The number system we use is a positional number system meaning that the position of each digit has an associated weight. The value of a given number
More informationSwitching Circuits & Logic Design
Switching Circuits & Logic Design JieHong Roland Jiang 江介宏 Department of Electrical Engineering National Taiwan University Fall 2013 1 1 Number Systems and Conversion Babylonian number system (3100 B.C.)
More informationNUMBERING SYSTEMS C HAPTER 1.0 INTRODUCTION 1.1 A REVIEW OF THE DECIMAL SYSTEM 1.2 BINARY NUMBERING SYSTEM
12 Digital Principles Switching Theory C HAPTER 1 NUMBERING SYSTEMS 1.0 INTRODUCTION Inside today s computers, data is represented as 1 s and 0 s. These 1 s and 0 s might be stored magnetically on a disk,
More informationComputer Science 281 Binary and Hexadecimal Review
Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two
More informationUnderstanding Binary Numbers. Different Number Systems. Conversion: Bin Hex. Conversion MAP. Binary (0, 1) Hexadecimal 0 9, A(10), B(11),, F(15) :
Understanding Binary Numbers Computers operate on binary values (0 and 1) Easy to represent binary values electrically Voltages and currents. Can be implemented using circuits Create the building blocks
More informationDigital Electronics. 1.0 Introduction to Number Systems. Module
Module 1 www.learnaboutelectronics.org Digital Electronics 1.0 Introduction to What you ll learn in Module 1 Section 1.0. Recognise different number systems and their uses. Section 1.1 in Electronics.
More informationReview 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 computer. Different
More informationDigital Design. Assoc. Prof. Dr. Berna Örs Yalçın
Digital Design Assoc. Prof. Dr. Berna Örs Yalçın Istanbul Technical University Faculty of Electrical and Electronics Engineering Office Number: 2318 Email: siddika.ors@itu.edu.tr Grading 1st Midterm 
More informationData Representation in Computers
Chapter 3 Data Representation in Computers After studying this chapter the student will be able to: *Learn about binary, octal, decimal and hexadecimal number systems *Learn conversions between two different
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 information1 Number System (Lecture 1 and 2 supplement)
1 Number System (Lecture 1 and 2 supplement) By Dr. Taek Kwon Many different number systems perhaps from the prehistoric era have been developed and evolved. Among them, binary number system is one of
More informationData types. lecture 4
Data types lecture 4 Information in digital computers is represented using binary number system. The base, i.e. radix, of the binary system is 2. Other common number systems: octal (base 8), decimal (base
More informationNumber Systems and Base Conversions
Number Systems and Base Conversions As you know, the number system that we commonly use is the decimal or base 10 number system. That system has 10 digits, 0 through 9. While it's very convenient for
More informationUNIT 2: NUMBER SYSTEM AND CODES.
UNIT 2: NUMBER SYSTEM AND CODES. Structure 2.1 Introduction 2.2 Objectives 2.3 Binary Numbers 2.3.1 BinarytoDecimal conversion 2.3.2 DecimaltoBinary Conversion 2.4 Octal Numbers 2.4.1 OctaltoBinary
More informationNumber Systems and. Data Representation
Number Systems and Data Representation 1 Lecture Outline Number Systems Binary, Octal, Hexadecimal Representation of characters using codes Representation of Numbers Integer, Floating Point, Binary Coded
More informationEE 3170 Microcontroller Applications
EE 37 Microcontroller Applications Lecture 3 : Digital Computer Fundamentals  Number Representation (.) Based on slides for ECE37 by Profs. Sloan, Davis, Kieckhafer, Tan, and Cischke Number Representation
More informationSystems I: Computer Organization and Architecture
Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems  Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x
More informationCSI 333 Lecture 1 Number Systems
CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...
More informationNumber Representation and Arithmetic in Various Numeral Systems
1 Number Representation and Arithmetic in Various Numeral Systems Computer Organization and Assembly Language Programming 203.8002 Adapted by Yousef Shajrawi, licensed by Huong Nguyen under the Creative
More information1. Number Representation
CSEE 3827: Fundamentals of Computer Systems, Spring 2011 1. Number Representation Prof. Martha Kim (martha@cs.columbia.edu) Web: http://www.cs.columbia.edu/~martha/courses/3827/sp11/ Contents (H&H 1.31.4,
More informationCPEN 214  Digital Logic Design Binary Systems
CPEN 4  Digital Logic Design Binary Systems C. Gerousis Digital Design 3 rd Ed., Mano Prentice Hall Digital vs. Analog An analog system has continuous range of values A mercury thermometer Vinyl records
More informationCommon Number Systems Number Systems
5/29/204 Common Number Systems Number Systems System Base Symbols Used by humans? Used in computers? Decimal 0 0,, 9 Yes No Binary 2 0, No Yes Octal 8 0,, 7 No No Hexadecimal 6 0,, 9, A, B, F No No Number
More informationCSC 1103: Digital Logic. Lecture Six: Data Representation
CSC 1103: Digital Logic Lecture Six: Data Representation Martin Ngobye mngobye@must.ac.ug Mbarara University of Science and Technology MAN (MUST) CSC 1103 1 / 32 Outline 1 Digital Computers 2 Number Systems
More informationEEE130 Digital Electronics I Lecture #2
EEE130 Digital Electronics I Lecture #2 Number Systems, Operations and Codes By Dr. Shahrel A. Suandi Topics to be discussed 21 Decimal Numbers 22 Binary Numbers 23 DecimaltoBinary Conversion 24
More informationGoals. Unary Numbers. Decimal Numbers. 3,148 is. 1000 s 100 s 10 s 1 s. Number Bases 1/12/2009. COMP370 Intro to Computer Architecture 1
Number Bases //9 Goals Numbers Understand binary and hexadecimal numbers Be able to convert between number bases Understand binary fractions COMP37 Introduction to Computer Architecture Unary Numbers Decimal
More informationCHAPTER 3 Number System and Codes
CHAPTER 3 Number System and Codes 3.1 Introduction On hearing the word number, we immediately think of familiar decimal number system with its 10 digits; 0,1, 2,3,4,5,6, 7, 8 and 9. these numbers are called
More informationCDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012
CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 Outline Data Representation Binary Codes Why 6311 and Excess3? Data Representation (1/2) Each numbering
More informationIntroduction Number Systems and Conversion
UNIT 1 Introduction Number Systems and Conversion Objectives 1. Introduction The first part of this unit introduces the material to be studied later. In addition to getting an overview of the material
More informationUseful Number Systems
Useful Number Systems Decimal Base = 10 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} Binary Base = 2 Digit Set = {0, 1} Octal Base = 8 = 2 3 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7} Hexadecimal Base = 16 = 2
More informationBinary Representation
Binary Representation The basis of all digital data is binary representation. Binary  means two 1, 0 True, False Hot, Cold On, Off We must tbe able to handle more than just values for real world problems
More informationSigned Binary Arithmetic
Signed Binary Arithmetic In the real world of mathematics, computers must represent both positive and negative binary numbers. For example, even when dealing with positive arguments, mathematical operations
More informationThe largest has a 0 in the sign position and 0's in all other positions:
10.2 Sign Magnitude Representation Sign Magnitude is straightforward method for representing both positive and negative integers. It uses the most significant digit of the digit string to indicate the
More informationDecimal Numbers: Base 10 Integer Numbers & Arithmetic
Decimal Numbers: Base 10 Integer Numbers & Arithmetic Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 )+(1x10 0 ) Ward 1 Ward 2 Numbers: positional notation Number
More informationCHAPTER THREE. 3.1 Binary Addition. Binary Math and Signed Representations
CHAPTER THREE Binary Math and Signed Representations Representing numbers with bits is one thing. Doing something with them is an entirely different matter. This chapter discusses some of the basic mathematical
More informationELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE470/570: MicroprocessorBased System Design Fall 2014.
REVIEW OF NUMBER SYSTEMS Notes Unit 2 BINARY NUMBER SYSTEM In the decimal system, a decimal digit can take values from to 9. For the binary system, the counterpart of the decimal digit is the binary digit,
More informationCHAPTER TWO. 2.1 Unsigned Binary Counting. Numbering Systems
CHAPTER TWO Numbering Systems Chapter one discussed how computers remember numbers using transistors, tiny devices that act like switches with only two positions, on or off. A single transistor, therefore,
More informationCOMP2121: Microprocessors and Interfacing
Interfacing Lecture 3: Number Systems (I) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2005 Overview Positional notation Decimal, hexadecimal and binary One complement Two s complement
More informationBinary Representation and Computer Arithmetic
Binary Representation and Computer Arithmetic The decimal system of counting and keeping track of items was first created by Hindu mathematicians in India in A.D. 4. Since it involved the use of fingers
More informationTECH. Arithmetic & Logic Unit. CH09 Computer Arithmetic. Number Systems. ALU Inputs and Outputs. Binary Number System
CH09 Computer Arithmetic CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer Representation Integer Arithmetic FloatingPoint Representation
More informationLecture 11: Number Systems
Lecture 11: Number Systems Numeric Data Fixed point Integers (12, 345, 20567 etc) Real fractions (23.45, 23., 0.145 etc.) Floating point such as 23. 45 e 12 Basically an exponent representation Any number
More informationCPE 323 Data Types and Number Representations
CPE 323 Data Types and Number Representations Aleksandar Milenkovic Numeral Systems: Decimal, binary, hexadecimal, and octal We ordinarily represent numbers using decimal numeral system that has 10 as
More informationLecture 1 Introduction, Numbers, and Number System Page 1 of 8
Lecture Introduction, Numbers and Number System Contents.. Number Systems (Appendix B)... 2. Example. Converting to Base 0... 2.2. Number Representation... 2.3. Number Conversion... 3. To convert a number
More informationNumber Representation
Number Representation Number System :: The Basics We are accustomed to using the socalled decimal number system Ten digits ::,,,3,4,5,6,7,8,9 Every digit position has a weight which is a power of Base
More informationChapter 4: Computer Codes
Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence 36 Slide 2/30 Data
More informationChapter II Binary Data Representation
Chapter II Binary Data Representation The atomic unit of data in computer systems is the bit, which is actually an acronym that stands for BInary digit. It can hold only 2 values or states: 0 or 1, true
More informationUnit 2: Number Systems, Codes and Logic Functions
Unit 2: Number Systems, Codes and Logic Functions Introduction A digital computer manipulates discrete elements of data and that these elements are represented in the binary forms. Operands used for calculations
More information2. Number Systems  Positional Number Systems (1)  2. Number Systems  Binary Numbers  2. Number Systems  Positional Number Systems (2) 
Sistemas Digitais I LESI  2º ano Lesson 2  Number Systems Prof. João Miguel Fernandes (miguel@di.uminho.pt) Dept. Informática  Positional Number Systems (1)  We use daily a positional number system.
More informationLevent EREN levent.eren@ieu.edu.tr A306 Office Phone:4889882 INTRODUCTION TO DIGITAL LOGIC
Levent EREN levent.eren@ieu.edu.tr A306 Office Phone:4889882 1 Number Systems Representation Positive radix, positional number systems A number with radix r is represented by a string of digits: A n
More informationChapter 1: Digital Systems and Binary Numbers
Chapter 1: Digital Systems and Binary Numbers Digital age and information age Digital computers general purposes many scientific, industrial and commercial applications Digital systems telephone switching
More informationELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE378: Digital Logic and Microprocessor Design Winter 2015.
ECE378: Digital Logic and Microprocessor Design Winter 5 UNSIGNED INTEGER NUMBERS Notes  Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digitbydigit representation of a positive
More information198:211 Computer Architecture
198:211 Computer Architecture Topics: Lecture 8 (W5) Fall 2012 Data representation 2.1 and 2.2 of the book Floating point 2.4 of the book 1 Computer Architecture What do computers do? Manipulate stored
More informationChap 3 Data Representation
Chap 3 Data Representation 311 Data Types How to representation and conversion between these data types? 311 Data Types : Number System Radix : Decimal : radix 10 Binary : radix 2 311 Data Types : Number
More information1. True or False? A natural number is the number 0 or any number obtained by adding 1 to a natural number.
CS Illuminated, 5 th ed. Chapter 2 Review Quiz 1. True or False? A natural number is the number 0 or any number obtained by adding 1 to a natural number. 2. True or False? The category of numbers called
More informationPresented By: Ms. Poonam Anand
Presented By: Ms. Poonam Anand Know the different types of numbers Describe positional notation Convert numbers in other bases to base 10 Convert base 10 numbers into numbers of other bases Describe the
More informationBinary Numbers. Binary Octal Hexadecimal
Binary Numbers Binary Octal Hexadecimal Binary Numbers COUNTING SYSTEMS UNLIMITED... Since you have been using the 10 different digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 all your life, you may wonder how
More informationEEM 232 Digital System I
EEM 232 Digital System I Instructor : Assist. Prof. Dr. Emin Germen egermen@anadolu.edu.tr Course Book : Logic and Computer Design Fundamentals by Mano & Kime Third Ed/Fourth Ed.. Pearson Grading 1 st
More informationDigital Arithmetic. Digital Arithmetic: Operations and Circuits Dr. Farahmand
Digital Arithmetic Digital Arithmetic: Operations and Circuits Dr. Farahmand Binary Arithmetic Digital circuits are frequently used for arithmetic operations Fundamental arithmetic operations on binary
More informationChapter 4. Computer Arithmetic
Chapter 4 Computer Arithmetic 4.1 Number Systems A number system uses a specific radix (base). Radices that are power of 2 are widely used in digital systems. These radices include binary (base 2), quaternary
More informationLecture 2. Binary and Hexadecimal Numbers
Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations
More information23 1 The Binary Number System
664 Chapter 23 Binary, Hexadecimal, Octal, and BCD Numbers 23 The Binary Number System Binary Numbers A binary number is a sequence of the digits 0 and, such as 000 The number shown has no fractional part
More information1.3 Data Representation
862828 r4 vs.fm Page 9 Thursday, January 2, 2 2:4 PM.3 Data Representation 9 appears at Level 3, uses short mnemonics such as ADD, SUB, and MOV, which are easily translated to the ISA level. Assembly
More informationBinary Numbers. Bob Brown Information Technology Department Southern Polytechnic State University
Binary Numbers Bob Brown Information Technology Department Southern Polytechnic State University Positional Number Systems The idea of number is a mathematical abstraction. To use numbers, we must represent
More informationNumber Systems & Encoding
Number Systems & Encoding Lecturer: Sri Parameswaran Author: Hui Annie Guo Modified: Sri Parameswaran Week2 1 Lecture overview Basics of computing with digital systems Binary numbers Floating point numbers
More informationA B C
Data Representation Module 2 CS 272 Sam Houston State University Dr. Tim McGuire Copyright 2001 by Timothy J. McGuire, Ph.D. 1 Positional Number Systems Decimal (base 10) is an example e.g., 435 means
More informationDigital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture  04 Digital Logic II May, I before starting the today s lecture
More informationChapter 2 Numeric Representation.
Chapter 2 Numeric Representation. Most of the things we encounter in the world around us are analog; they don t just take on one of two values. How then can they be represented digitally? The key is that
More informationCHAPTER 2 Data Representation in Computer Systems
CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 47 2.2 Positional Numbering Systems 48 2.3 Converting Between Bases 48 2.3.1 Converting Unsigned Whole Numbers 49 2.3.2 Converting Fractions
More informationNumber Systems. Introduction / Number Systems
Number Systems Introduction / Number Systems Data Representation Data representation can be Digital or Analog In Analog representation values are represented over a continuous range In Digital representation
More informationChapter 2. Binary Values and Number Systems
Chapter 2 Binary Values and Number Systems Numbers Natural numbers, a.k.a. positive integers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative numbers A
More informationData Representation Binary Numbers
Data Representation Binary Numbers Integer Conversion Between Decimal and Binary Bases Task accomplished by Repeated division of decimal number by 2 (integer part of decimal number) Repeated multiplication
More informationORG ; ZERO. Introduction To Computing
Dec 0 Hex 0 Bin 00000000 ORG ; ZERO Introduction To Computing OBJECTIVES this chapter enables the student to: Convert any number from base 2, base 10, or base 16 to any of the other two bases. Add and
More informationNumber Systems Richard E. Haskell
NUMBER SYSTEMS D Number Systems Richard E. Haskell Data inside a computer are represented by binary digits or bits. The logical values of these binary digits are denoted by and, while the corresponding
More informationBinary Numbers Again. Binary Arithmetic, Subtraction. Binary, Decimal addition
Binary Numbers Again Recall than N binary digits (N bits) can represent unsigned integers from 0 to 2 N 1. 4 bits = 0 to 15 8 bits = 0 to 255 16 bits = 0 to 65535 Besides simply representation, we would
More informationUNIT 2 : NUMBER SYSTEMS
UNIT 2 : NUMBER SYSTEMS page 2.0 Introduction 1 2.1 Decimal Numbers 2 2.2 The Binary System 3 2.3 The Hexadecimal System 5 2.4 Number Base Conversion 6 2.4.1 Decimal To Binary 6 2.4.2 Decimal to Hex 7
More informationNumber Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi)
Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi) INTRODUCTION System A number system defines a set of values to represent quantity. We talk about the number of people
More informationArithmetic of Number Systems
2 Arithmetic of Number Systems INTRODUCTION Arithmetic operations in number systems are usually done in binary because designing of logic networks is much easier than decimal. In this chapter we will discuss
More informationTHE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DIGITAL LOGIC DESIGN DISCUSSION ECOM Eng. Huda M.
THE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DIGITAL LOGIC DESIGN DISCUSSION ECOM 2012 Eng. Huda M. Dawoud September, 2015 1.1 List the octal and hexadecimal numbers
More informationChapter 1 Binary Systems 11. Digital Systems
Chapter 1 Binary Systems 11. Digital Systems The Generalpurpose digital computer is the bestknown example of a digital system. The major parts of a computer are a memory unit, a central processing unit,
More informationSection 1.4 Place Value Systems of Numeration in Other Bases
Section.4 Place Value Systems of Numeration in Other Bases Other Bases The HinduArabic system that is used in most of the world today is a positional value system with a base of ten. The simplest reason
More informationNumber Systems and Data Representation CS221
Number Systems and Data Representation CS221 Inside today s computers, data is represented as 1 s and 0 s. These 1 s and 0 s might be stored magnetically on a disk, or as a state in a transistor, core,
More informationNumber and codes in digital systems
Number and codes in digital systems Decimal Numbers You are familiar with the decimal number system because you use them everyday. But their weighted structure is not understood. In the decimal number
More informationBase Conversion written by Cathy Saxton
Base Conversion written by Cathy Saxton 1. Base 10 In base 10, the digits, from right to left, specify the 1 s, 10 s, 100 s, 1000 s, etc. These are powers of 10 (10 x ): 10 0 = 1, 10 1 = 10, 10 2 = 100,
More informationInteger and Real Numbers Representation in Microprocessor Techniques
Brno University of Technology Integer and Real Numbers Representation in Microprocessor Techniques Microprocessor Techniques and Embedded Systems Lecture 1 Dr. Tomas Fryza 30Sep2011 Contents Numerical
More information