# Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Save this PDF as:

Size: px
Start display at page:

Download "Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur"

## Transcription

1 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 first we quickly go through the last day s lectures answers of the quiz. (Refer Slide Time: 01:14) The first question was why binary number system is used for most digital system, now as you know the most of the digital systems use discrete number of parameter levels say the voltage levels or current levels. And, the finite number of values in a digital system can be represented by a vector of signals with just two values, these are binary signals means that 2 that can be represented by a string of 0 and or 10 that is And the device which process the signal is very simple to implement say a switch either 0 or 1 means switch on or so off or open or closed. So, that is why that mainly binary number system is used for more most of the digital systems.

2 (Refer Slide Time: 02:03) Second question was the conversion, the following binary numbers to decimal. So, as here the binary is in binary radix is 2 using the formula we did this should be means 1 into 2 to the power 4, 4 is the place value. Similarly, 0 into 2 to the power 3, plus 1 into 2 square 0 into 2 to the power 1 1 into 2 to the power 0. And the non-integer part, 0 into 2 to the power minus 1, 0 into 2 to the power minus 2, 1 into 2 to the power minus 3, so if you do this computation we have getting in decimal number system. Similarly, the other one also similarly you can get that it is in decimal number systems. (Refer Slide Time: 03:17)

3 Third question was the convert the decimal numbers to binary. So, the first one was 678 in decimal in this case we will divide by 2 as I want the number to be converted in binary system where the radix is 2. So, divide by 2 and this will be a repeated division and we are accumulating the remainders, 678 divided by 2, remainder is 0. For the second division remainder is 1, similarly I am getting this remainders, again it is continuing here 21 divided by 2, actually it will be remain remainder is 1. Then, this next remainder is 0, next is 1 like that, and what we will be getting the answer, this is 6 78 in decimal number system, 10 is that we have to take the remainder in reverse way; that means, , so this is my in binary. (Refer Slide Time: 05:08) And, the b part answer of the b part is there is one non-integer portion also, so the integer portion is similar by repeated division we will get that then integer portion that 129 in decimal number system is We can see this thing in other way see that actually the place value here this is So, this is the places see if we take the here this value will be 128 and this value will be 1, this is 128 plus 1, because rest of the digits are 0. So, this is 129 in decimal number system. Now the non-integer portion, I can get by repeatedly multiplication by the radix value. So, this is the first non-integer is it will be multiplied by 2, then it will be and integer is 1. Similarly, I will get again the non-integer portion multiplied by 2, another integer 1, I am in that way I am getting that this is 0 this is 0. So, the non-integer portion

4 0.84 in decimal it will be in binary. So, the number in decimal is converted to binary and the binary number is and this is approximated. (Refer Slide Time: 07:57) Now, the last question was the conversion from decimal and binary numbers to binary coded decimal the BCD value. Now, see that the first number was a 5648 in decimal, so the way we have define the binary coded decimal we will take that for each decimal digit that four such binary values. So, that means, here 5 means say this is a 0101, 6 means this is a 0110, 4 means 0100, 8 means , this is my BCD. Now, the part b is the binary number, already it is a binary number is given this is in binary. Now, what is the decimal equivalent of this, because this is 1 this is , 0 into 16, 0 into 32, 0 into 64, this is 1 into 128; that means, the value is 141 in decimal. Now, once it is converted into decimal, now the same way that each digit is replaced by 4 binary digits; that means 1 means , 4 is and 1 is again , this is my binary coded decimal value. So, these are the answers of the lecture 3 quiz.

5 (Refer Slide Time: 10:05) Now, we start our today s lecture the digital logic 2, first we see the accuracy of binary conversion of non-integers. See, when a non-integer decimal is converted to a binary number, sometimes we truncate the number of digits by n say n can be 4; that means, after decimal points, I can take 4 digits I can take 5 digits or say 9 digits. But still, it does not stop; that means, that fraction part does not becomes 0, but we stop, this is called that truncated to some n digits. Then; obviously, there is there will be some errors, because if we increase the number of bits, then we will be nearer to the actual value we will be near and nearer to the actual value. So, now this is called we call this we are defining as a this is a error; that means, if I take up to after decimal points, if I take after 5 digits, I will be getting a more accurate result, instead if I take three digit value. Now, the maximum error in decimal is defined as 2 to the power minus n, if it is truncated by n bits. See, why I am we are telling this thing, see a binary number is expressed as say i j k l like that; that means, say here after decimal point I am taking say 7 such bits, i j k can be 0 or 1. Now see, as this is a it is converted to a binary number systems, that is why i j k are 0 or 1. Now, up to 4 bits already the or 0 value is there. But, from the 5th bit onwards I have represented the bits as i j k like that; that means i j k came be either 0 or 1. Now, if the 5th bit and all succeeding bits are 0, then the number is accurate up to 4 bit position, because these are remaining bits are all zeros. So, what I can tell that this is , then

6 we have all are zeroes no need to write this thing. So, I can tell that this is 0 point even it is up to 4th or here in this case it is up to 4th bit position this is correct. Now, see if 5th bit and all succeeding bits are 1 then the error would be that point and then these are all ones. So, actually these are not zeroes, if it is 0, we can easily discard those values, but if i j k these values are 1, then I cannot discard that, then actually I am approximating that values. So, there must be some errors introduced in the binary number. And, what is that error, and that error is that up to 4 decimal point it was the value was given in binary. Now, I am taking as it these are all 0 and this i j k values and succeeding values are 1, so as actually these are the, it were these values, where actually present or it should be incorporated in the binary number. But, we have dropped this value from the binary number. (Refer Slide Time: 14:15) So, that is why it is a, this is defined as a error, now we see that, how we have approximated this thing. See in decimal the error is E 10, how it is coming, is 2 to the power minus 5 2 to the power minus 6 2 to the power minus 7 plus 2 to the power minus 8. We see the previous slide again, see actual I have dropped the 5th bits and the all succeeding bits and if they were all once then it was we have define these as the error. Now, see this is the place value, this is after decimal point this is the 5th bit, so it will be 1 into 2 to the power minus 5. The second 1 is 1 into 2 to the power minus 6 and that I was getting here. See that this is 2 to the power minus value the 5th bit this is the error

7 for the 6th bit 1 into 2 to the power minus 6 2 to the power minus 7 2 to the power minus 8 and so on. Now, if I take common that 2 to the power minus 5, then it will be 1 plus 2 to the power minus 1 2 to the power minus 2 plus 2 to the power minus 3 like that. Now, this term within the parenthesis this term is a geometric series and it approaches a value nearly equal to 1 divided by 1 minus 1 by 2 and which is nothing but the 2. So, this value this within the parenthesis this value becomes this is becomes 2. And if you, what will be the value of E 10, this is 2 to the power minus 5 and multiplied by 2, this value is 2 to the power minus 4. So, if n bits in our example, we have tried n equal to 4; that means, up to 4 bits the binary number was given or the number was truncated up to 4 bits after decimal point the 4 bits I have taken. So, if n bits are used to represent the non-integer part of a binary number, then the maximum error due to termination is E 10 equal to 2 the power minus n; that means here, 4 is replaced by n in general cases. So, this we are telling that accuracy of a number when it is converted from decimal to binary. (Refer Slide Time: 18:01) Now, last time we have read that, what do we mean by octal numbers, what do we mean by hexadecimal numbers or octal number systems hexadecimal number systems etcetera. Now, today we see another type of binary number systems, what we call that binary coded numbers, why, because already we have mentioned that the mainly the computer

8 handles or it very advantageous if the it is all the numbers that are used in computer is represented in a binary number systems. So, even it is a used in octal or hexadecimal, how they are converted into strings of zeroes and ones, means mainly the binary values only two values. Then obviously, it will be very much it is very easy to implement in for digital systems, just the simple example. I have given that one switch or else we can model as a switch on is one switch off is 0; that means, this is the binary system. So, first we see that what is binary coded octal, normally called BCO. So, for octal number system already we have seen that the base or radix is 8 and the 8 symbols are that 0 to 7 means these 8 values are mainly used. Now, the computer uses binary coded octal, already I have mentioned, now how this octal number is converted to binary coded octal, that say three binary positions are used to represent one digit of octal number. Let us take an example, say the example I have taken, this is octal is that is in octal 1. Now, each positions say this positions that second position value is 2 in octal, that will be represented by 3 bit binary means say two means. If I take that 2 binary of 2, how I can do that thing, that again if I it will it should be divided by 1, then it will be 1 0. So, if I take this value this will be 1 0, so if I want to represent 2 by 3 bit binary numbers this will be 0 1 0, the leading bit I have given 0, it is of no meaning so 010, so the BCO of 2 is Similarly, the 3 we can represent as and the 7 is 1 1 1, the octal , that gives the binary coded octal that 0 1 0, 0 1 1, Now, it is very much advantageous, if I want to convert that thing to something binary and what we will be doing, that we will suppress the leading zeroes. See, here only one leading zeroes are there, see only this is 0, so the binary will be value will be only So, that advantage is that it is very easy to convert from binary to BCO or BCO to binary and that is why these are very much used in the computer systems.

9 (Refer Slide Time: 23:12) Now, again some other different examples we take that this is 159 in decimal number systems this is 159. So, first this is converted into the binary that Now, what I can do that as it is a binary, actually I am doing the reverse thing now binary to BCO. So, what I we will be doing, we know that the three digits I have to take together, so this is from if I start from the LSB side from the right hand side to left, then this 3 is grouped this 3 is grouped and see only 1 1 is left. So, what I can do, I can put say 2 zeroes here, because in certain 2 0 in the leading position does not effect, because it means that value is 0. So, how I group in 3 bits, this is this is this is 1 1 1, now if I convert means we know that this is 1 this is not true. This is actually means this is 1, then means this is 3 and means this is 7. So, this is my 137 in octal value. Now, if I take another example in decimal number system, then first it is converted to say that decimal binary numbers. So, this is , we are taking this as the octal value. So, this is 6725 and the base is 8. Now, what we will be doing, again that each digit in octal that should be represented by three binary bits. So, the 6 this is nothing but 6 represented in 3 binary bits this is 7, this is actually 2 and this is 5, this is my BCO binary coded octal, what will be binary, because there is no leading 0, no leading zeroes are there. So, if I just merge this 3 bit numbers, then it will be my binary that this is my binary numbers. Now, we consider one fraction, this is 2.5 in octal, then what

12 (Refer Slide Time: 33:44) Now, we see that some other codes 1 is called the alphanumeric codes, now alphanumeric codes or other characters are necessary in several instances. So far, we have seen only the numbers, either it can be decimal number either it can be octal number or it can be hexadecimal numbers. But sometimes we need characters and some other control characters. Then, how they can be converted into binary values 0 or 1 if it is used in computer see in our keyboard all of we know that keyboard that A to Z, the 26 characters are there 0 to 9, the 10 decimal values are there. And, there are say some more control characters say some mathematical operators are there less than greater than some question mark is there. Then how this characters or this alphanumeric characters, how they can be converted into 0 and 1. Now, there are many choices of code sets to represent alphanumeric characters and several control characters. Now, one will excepted code set is the ASCII and the full term form is the American Standard Code For Information Interchange, so this is a very well known standard in micro processor work.

13 (Refer Slide Time: 35:51) So, we call see that how this, what is this ASCII code, see ASCII is a 7 bit code normally used in exchanging information. See in our keyboard that when we press a A., so actually A means immediately it is converted to a 7 bit binary numbers. This is predefined this is a predefined numbers say this , this is my capital A. If I represent this thing in hex will be simple, because just now we have done binary to hexadecimal means we have to group it will be grouped by 4, here it is 4 and here another 0 I will put. So, means this is 4 and means this is 1, this is a hex 4 1. Similarly, the small letter that will be by this 7 bit value binary values that and and this is my hex is 61. Similarly, that all A to Z are given and a 2 3 examples that capital K capital J, how they are defined, so; that means, here the else these are 7 bit ASCII. So, 2 to the power 7 mean that 128 such characters and control characters together. Total 128 numbers I can represent by this 7 bit binary values and always that just this is easy to express the hexadecimal because it is very smaller in size. So, the hexadecimal values are also given. See this is the parenthesis, that opening parenthesis is given by these 7 bit binary values and the hex is 28. The closing parenthesis similarly it is define this 7 bit numbers and this hex value is 29, if it is an operator say less than or it is a greater than then also that it has some ASCII code. So, we are telling this is the ASCII code of this 7 bit binary or the hex, these are the ASCII code of less than or greater than say at the rate. So, this is the 7 bit code and hex

14 code is form 4 0, similarly the question mark the ASCII code of question mark is 3 F of this is a numbers. And. So for, that in the keyboard whatever characters and the control characters the mathematical operators say some other special functions say F 1 F 2 F 6 some del acknowledge or home end everyone that has some ASCII code. So, when we are pressing this thing immediately it is converted into that 0 1 values or strings of 0 ones these are predefined and obviously, it will be then realized as that particular A. (Refer Slide Time: 39:28) Now we see, another three basic operation in binary system, because so far from our discussion, what we have seen that mainly in computer or in digital systems, we will be using the binary number system. Now, in binary we have only two values because binary the base is 2, so it is the 0 and 1 value, so there are only two values that 0 and 1. So, first thing I have to define if I want to define a binary addition.

16 Now, again this is 0 plus 1 1 and 1 plus 1 sum 0 carry 1, now if it is 3 1 that similar this is similar 3 1 to be added this will be sum 1 carry 1 and that should be come here. So, 1 plus 1 0 carry 1, again this is 1 0 plus 0 plus plus 1 0 carry 1 1 plus 1 plus 1 1 carry 1 1 plus 1 0 carry 1 1 plus 1 plus 1 carry 1 sum 1.So, this is my binary addition and these are the carries, these are my carries and these two operands. (Refer Slide Time: 45:19) Now, if I know binary addition then; obviously, the same rule I can apply to binary subtraction. We see the binary subtraction. Now, see that again if I write the addition rule they are the rules are 0 plus 0 equal to 0 0 plus 1 equal to 1 1 plus 0 equal to 1 1 plus 1 equal to 0 carry 1. So, here carry if you write carry 1, this my sum, the same rule now see here I am subtracting from the value So, first if it is see that 1 minus 1; that means, see here I can take from here as if these 1 is see these 1 is subtracted from these; that means 1 plus 0 equal to 1. So, this if I subtract this thing, so 1 minus 1 equal to 0, so the same thing I have done 1 minus 1 equal to 0. Now 0 minus 1, what do we mean by 0 minus 1, so; that means, I have to take these 1, so 0 minus 1 that will be 1, so the same thing I have done 0 minus 1 it is 1. So, from our normal subtraction rule or the decimal system that what we know, actually I borrow 1, because 0 is lesser than 1, so I borrow a 1 and that is 1 0. So, these are my this is my borrow for this subtraction bit. So, this is 1 is borrowed, so 1 0 this is 1. Now,. So, this becomes this becomes this becomes 0, because I have borrowed. So, this is less this become 0.

17 So, now again 1 I have to subtract from 0, so again I it should be borrowed and this is 1 0. So, again it is 1 and it is again borrowed, so this becomes 0. Now see that 0 and 0, this 0 minus 0 is 0, so actually here it is not it is not borrow 0 minus 0, it is 0 there is no borrow. Now, again 0 minus 1 0 minus 1, again this is borrow, see 1 is 1, I want to subtract from 0. So, this should be that 1 subtracted from 0, this should be 1, this should be again this is actually 1 0. So, this is 1 again it is borrowed, this becomes 1 0 similarly this is 1 and again this becomes this 1, this is this become 0, 0 1 as 0 0, this is my result. So, this is the binary subtraction. So, actually there, what we have seen the binary rule or binary addition has been applied. (Refer Slide Time: 50:12) Now, binary multiplication now binary multiplication means the same to our decimal multiplication again the only the multiplication rule is different; that means, here again there are only digit numbers 0 and 1.

18 (Refer Slide Time: 50:36) So, what we can say that what were the basic rules, see for binary multiplication again this can be 0 into 0 it is defined as 0. Then, again 0 into 1 then again it is 0 then 1 into 0; obviously, that will be 0 and then this is 1 into 1 again this is a 1. So, this only this multiplication is different and addition will be just now the binary addition we have defined that we have to do. Now, if I apply, say I have two such operands say I want to multiply and So, the 0 multiplied by anything already we have seen that will be 0, then again I am giving the cross this will be multiplied by 1. So, 1 multiplied by 1 into 1 1 and 1 into 0 0, so the same thing again that it will be multiplied by 0, then it will be multiplied by 1 now only binary addition I have to apply. So, this is 0 now 0 plus 1 already we have seen 0 plus 1 is 1, 0 plus 1 1 and 1 plus 0, so this is 1. Now, 0 plus 1 1 plus plus 1 sum 0, because we know 1 plus 1 is sum 0, but carry 1, this becomes now sum 0 carry 1 carry 1 say I am giving 1 carry 1. Now, if I add again 3 0 means 0 and 1 plus 1 0 carry 1. Now, again 1 plus plus 1 1, but carry 1 again 0 plus 0 plus 1 1 and this 1 1, so this is my result. The similar the binary addition rule is applied and only the multiplication is slightly different otherwise that total multiplication rule is same as that of our decimal notation.

19 (Refer Slide Time: 53:52) Now, we see that our today s quiz question, that lecture 4 quiz the first thing is the convert the decimal number in decimal base to binary with an error less than 1 percent. Second is, convert the following decimal numbers to hex and binary coded hex, so that this is the two decimal numbers are given one is pure integer. One has the integer as well as non-integer portion and we have to convert that thing to hexadecimal numbers as well as BCH the binary coded hexadecimal. Now, convert the following binary numbers to octal and binary coded octal and this is very similar to the question number 2, but only the binary is itself given. And, write the ASCII code for the message the is digital at IIT dot ac dot in. So that means, I want that this, what will be the ASCII code of these message, if when I type this when I type this message that the is digital at the rate IIT dot ac dot in. Then, how it is converted to that ASCII, so to do that thing so, these are the four questions for lecture 4 quiz. So, today we end at the at this point.

20 (Refer Slide Time: 56:11) Preview of next lecture before that we quickly go through the answers of the last day s lecture quiz. (Refer Slide Time: 56:25) So, last day s quiz the there are 4 questions given and we see the answers. The first question was the convert the decimal number decimal to binary with an error less than 1 percent. Now, as the error is 1 percent, so the, what will be the error on 0.252, so we will be multiplying this thing by 0.01 into the number So, this is equal to

21 Now, the truncation error; that means, when we convert the decimal number to the binary up to, what digit we will convert it, so if it is up to n bits; that means, after decimal point. If we take the value up to n bits then we know the error is 2 to the power minus n last lecture we discuss that thing, so these error should be less than these 1 percent error means So, 2 to the power minus 1 is less than that can be written as 2 to the power n greater than 397. So from this expression, we can get the n if I take the log on both side, then it will be log of 397 divided by log 2 and this is value equal to Now, as n is the number of bits, so this should be some integer value and that is, why we are, taking the nearest integer is 9 that is my nearest integer. So, when we convert 252 as binary then we have to if we take the number of bits after decimal point is not n means in control 9; that means, if we take 9 bits then it will be the error will be less than 1 percent. So; that means, point 252 in decimal is equal to in binary; that means nine bits after this decimal point. (Refer Slide Time: 58:55) Now, you see the next question, next 1 is the convert the following decimal numbers to hex and binary coded hex.

22 (Refer Slide Time: 59:05) The first 1 we see that 584 is the number, now, if I.

### Digital System Design Prof. D. Roychoudhury Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Digital System Design Prof. D. Roychoudhury Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 03 Digital Logic - I Today, we will start discussing on Digital

### Oct: 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

### الدكتور المھندس عادل مانع داخل

الدكتور المھندس عادل مانع داخل / میسان جامعة / كلیة الھندسة قسم الھندسة الكھرباي یة Chapter 1: Digital Systems Discrete Data Examples: 26 letters of the alphabet (A, B etc) 10 decimal digits (0, 1, 2 etc)

### CSC 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

### 2011, The McGraw-Hill 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

### Lecture 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

### 2.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

### Goals. 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

### NUMBERING 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,

### Unit 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

### Radix Number Systems. Number Systems. Number Systems 4/26/2010. basic idea of a radix number system how do we count:

Number Systems binary, octal, and hexadecimal numbers why used conversions, including to/from decimal negative binary numbers floating point numbers character codes basic idea of a radix number system

### Switching Circuits & Logic Design

Switching Circuits & Logic Design Jie-Hong Roland Jiang 江介宏 Department of Electrical Engineering National Taiwan University Fall 2013 1 1 Number Systems and Conversion Babylonian number system (3100 B.C.)

### Logic 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

### THE 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

### By 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

### Number 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,

### Base 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,

### Digital 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

### Chapter 1 Digital Systems and Information

Logic and Computer Design Fundamentals Chapter 1 Digital Systems and Information Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. Overview Digital Systems, Computers, and Beyond Information

### Introduction 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

### Data 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

### Common 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

### The 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

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 computer. Different

### Lecture 1: Digital Systems and Binary Numbers

Lecture 1: Digital Systems and Binary Numbers Matthew Shuman September 30th, 2009 1 Digital Systems 1-1 in Text 1.1 Analog Systems Analog systems are continuous. Look at the analog clock in figure 1. The

### Number 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

### Chapter I: Digital System and Binary Numbers

Chapter I: Digital System and Binary Numbers 1-1Digital Systems Digital systems are used in: - Communication - Business transaction - Traffic Control - Medical treatment - Internet The signals in digital

### Encoding 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

### EEM 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

### Lecture 1: Digital Systems and Number Systems

Lecture 1: Digital Systems and Number Systems Matthew Shuman April 3rd, 2013 The Digital Abstraction 1.3 in Text Analog Systems Analog systems are continuous. Look at the analog clock in figure 1. The

### Chapter 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

### (Refer Slide Time: 1:41)

Discrete Mathematical Structures Dr. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture # 10 Sets Today we shall learn about sets. You must

### 1. 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

### Computer 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

### CPE 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

### Number 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

### UNIT 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 Binary-to-Decimal conversion 2.3.2 Decimal-to-Binary Conversion 2.4 Octal Numbers 2.4.1 Octal-to-Binary

### Here 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

### Number Representation

Number Representation CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Topics to be Discussed How are numeric data

### Introduction ToNumber Systems

Introduction ToNumber Systems Collected by: Zainab Alkadhem Page 1 of 25 Digital systems have such a prominent role in everyday life that we refer to the present technological period as the digital age.

### 23 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

### Binary 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

### Presented 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

### Chapter 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

### Binary Numbers The Computer Number System

Binary Numbers The Computer Number System Number systems are simply ways to count things. Ours is the base-0 or radix-0 system. Note that there is no symbol for 0 or for the base of any system. We count,2,3,4,5,6,7,8,9,

### Number 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

### Binary 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

### Number 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

### CSI 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...

### Systems 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

### EE 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

### Number Representation

Number Representation Number System :: The Basics We are accustomed to using the so-called decimal number system Ten digits ::,,,3,4,5,6,7,8,9 Every digit position has a weight which is a power of Base

### Number 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

### Digital 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 E-mail: siddika.ors@itu.edu.tr Grading 1st Midterm -

### NUMBER SYSTEMS. 1.1 Introduction

NUMBER SYSTEMS 1.1 Introduction There are several number systems which we normally use, such as decimal, binary, octal, hexadecimal, etc. Amongst them we are most familiar with the decimal number system.

### Information Science 1

Information Science 1 - Representa*on of Data in Memory- Week 03 College of Information Science and Engineering Ritsumeikan University Topics covered l Basic terms and concepts of The Structure of a Computer

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

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

### Signed 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

### Data 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

### Section 1.4 Place Value Systems of Numeration in Other Bases

Section.4 Place Value Systems of Numeration in Other Bases Other Bases The Hindu-Arabic system that is used in most of the world today is a positional value system with a base of ten. The simplest reason

### 1 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

### 1.3 Data Representation

8628-28 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

### Activity 1: Bits and Bytes

ICS3U (Java): Introduction to Computer Science, Grade 11, University Preparation Activity 1: Bits and Bytes The Binary Number System Computers use electrical circuits that include many transistors and

### Data 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

### Theory of Logic Circuits. Laboratory manual. Exercise 6

Zakład Mikroinformatyki i Teorii Automatów Cyfrowych Theory of Logic Circuits Laboratory manual Exercise 6 Selected arithmetic switching circuits 2008 Tomasz Podeszwa, Piotr Czekalski (edt.) 1. Number

### Binary, Hexadecimal, Octal, and BCD Numbers

23CH_PHCalter_TMSETE_949118 23/2/2007 1:37 PM Page 1 Binary, Hexadecimal, Octal, and BCD Numbers OBJECTIVES When you have completed this chapter, you should be able to: Convert between binary and decimal

### CPEN 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

### Chapter 1 Binary Systems 1-1. Digital Systems

Chapter 1 Binary Systems 1-1. Digital Systems The General-purpose digital computer is the bestknown example of a digital system. The major parts of a computer are a memory unit, a central processing unit,

### CS321. Introduction to Numerical Methods

CS3 Introduction to Numerical Methods Lecture Number Representations and Errors Professor Jun Zhang Department of Computer Science University of Kentucky Lexington, KY 40506-0633 August 7, 05 Number in

### EEE130 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 2-1 Decimal Numbers 2-2 Binary Numbers 2-3 Decimal-to-Binary Conversion 2-4

### Positional Numbering System

APPENDIX B Positional Numbering System A positional numbering system uses a set of symbols. The value that each symbol represents, however, depends on its face value and its place value, the value associated

### Digital 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

### UNIT 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

### Chapter 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

### NUMBER SYSTEMS CHAPTER 19-1

NUMBER SYSTEMS 19.1 The Decimal System 19. The Binary System 19.3 Converting between Binary and Decimal Integers Fractions 19.4 Hexadecimal Notation 19.5 Key Terms and Problems CHAPTER 19-1 19- CHAPTER

### Number System. Some important number systems are as follows. Decimal number system Binary number system Octal number system Hexadecimal number system

Number System When we type some letters or words, the computer translates them in numbers as computers can understand only numbers. A computer can understand positional number system where there are only

### Introduction to Telecommunications and Computer Engineering Unit 2: Number Systems and Logic

Introduction to Telecommunications and Computer Engineering Unit 2: Number Systems and Logic Syedur Rahman Lecturer, CSE Department North South University syedur.rahman@wolfson.oon.org Acknowledgements

### 2. 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.

### Chapter 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

### Number 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

### Data Representation. Why Study Data Representation?

Why Study Data Representation? Computers process and store information in binary format For many aspects of programming and networking, the details of data representation must be understood C Programming

### Useful 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

### Binary 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

### Chapter 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

### Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 1: Basic Concepts

Assembly Language for Intel-Based Computers, 4 th Edition Kip R. Irvine Chapter 1: Basic Concepts Slides prepared by Kip R. Irvine Revision date: 07/21/2002 Chapter corrections (Web) Assembly language

### Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC

Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 1 Number Systems Representation Positive radix, positional number systems A number with radix r is represented by a string of digits: A n

### Binary 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

### CHAPTER 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

### (Refer Slide Time: 00:01:16 min)

Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control

### THE BINARY NUMBER SYSTEM

THE BINARY NUMBER SYSTEM Dr. Robert P. Webber, Longwood University Our civilization uses the base 10 or decimal place value system. Each digit in a number represents a power of 10. For example, 365.42

### MT1 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.,

### Chapter 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

### Digital Electronics. 1.0 Introduction to Number Systems. Module

Module 1 www.learnabout-electronics.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.

### CDA 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 6-3-1-1 and Excess-3? Data Representation (1/2) Each numbering

### Integer 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:

### Lecture 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

### Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 1: Basic Concepts. Chapter Overview. Welcome to Assembly Language

Assembly Language for Intel-Based Computers, 4 th Edition Kip R. Irvine Chapter 1: Basic Concepts Slides prepared by Kip R. Irvine Revision date: 10/27/2002 Chapter corrections (Web) Printing a slide show

### CHAPTER 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