# = Chapter 1. The Binary Number System. 1.1 Why Binary?

Save this PDF as:

Size: px
Start display at page:

Download "= Chapter 1. The Binary Number System. 1.1 Why Binary?"

## Transcription

1 Chapter The Binary Number System. Why Binary? The number system that you are familiar with, that you use every day, is the decimal number system, also commonly referred to as the base-0 system. When you perform computations such as = 5, or 2 7 = 4, you are using the decimal number system. This system, which you likely learned in first or second grade, is ingrained into your subconscious; it s the natural way that you think about numbers. Of course it is not just you: It is the way that everyone thinks and has always thought about numbers and arithmetic. Evidence exists that Egyptians were using a decimal number system five thousand years ago. The Roman numeral system, predominant for hundreds of years, was also a decimal number system (though organized differently from the Arabic base-0 number system that we are most familiar with). Indeed, base-0 systems, in one form or another, have been the most widely used number systems ever since civilization started counting. In dealing with the inner workings of a computer, though, you are going to have to learn to think in a different number system, the binary number system, also referred to as the base-2 system. Before considering why we might want to use a different number system, let s first consider: Why do we use base-0? The simple answer: We have 0 fingers. Before the days of calculators and computers, we counted on our hands (many of us still do!). Consider a child counting a pile of pennies. He would begin: One, two, three,, eight, nine. Upon reaching nine, the next penny counted makes the total one single group of ten pennies. He then keeps counting: One group of ten pennies two groups of ten pennies three groups of ten pennies eight groups of ten pennies nine groups of ten pennies Upon reaching nine groups of ten pennies plus nine additional pennies, the next penny counted makes the total thus far: one single group of one hundred pennies. Upon completing the task, the child might find that he has three groups of one hundred pennies, five groups of ten pennies, and two pennies left over: 352 pennies. More formally, the base-0 system is a positional system, where the rightmost digit is the ones position (the number of ones), the next digit to the left is the tens position (the number of groups of 0), the next digit to the left is the hundreds position (the number of groups of 00), and so forth. The base-0 number system has 0 distinct symbols, or digits (0,, 2, 3, 8, 9). In decimal notation, we write a number as a string of symbols, where each symbol is one of these ten digits, and to interpret a decimal number, we multiply each digit by the power of 0 associated with that digit s position. For example, consider the decimal number: This number is: = position position position position (i.e., thousands position) (i.e., hundreds position) (i.e., tens position) (i.e., ones position)

3 in base-0 would conclude that there were 5 pennies. So, 5 in base-0 is equivalent to 0 in base-2. To avoid confusion when the base in use if not clear from the context, or when using multiple bases in a single expression, we append a subscript to the number to indicate the base, and write: Just as with decimal notation, we write a binary number as a string of symbols, but now each symbol is a 0 or a. To interpret a binary number, we multiply each digit by the power of 2 associated with that digit s position. For example, consider the binary number 0. This number is: 0 = position position position position (i.e., eights position) (i.e., fours position) (i.e., twos position) (i.e., ones position) Since binary numbers can only contain the two symbols 0 and, numbers such as 25 and 4000 cannot be binary numbers. We say that all data in a computer is stored in binary that is, as s and 0 s. It is important to keep in mind that values of 0 and are logical values, not the values of a physical quantity, such as a voltage. The actual physical binary values used to store data internally within a computer might be, for instance, 5 volts and 0 volts, or perhaps 3.3 volts and 0.3 volts or perhaps reflection and no reflection. The two values that are used to physically store data can differ within different portions of the same computer. All that really matters is that there are two different symbols, so we will always refer to them as 0 and. A string of eight bits (such as 0000) is termed a byte. A collection of four bits (such as 0) is smaller than a byte, and is hence termed a nibble. (This is the sort of nerd-humor for which engineers are famous.) The idea of describing numbers using a positional system, as we have illustrated for base-0 and base-2, can be extended to any base. For example, the base-4 number 23 is: 2 3 = position position position (i.e., sixteens position) (i.e., fours position) (i.e., ones position) 3

4 .3 Converting Between Binary Numbers and Decimal Numbers We humans about numbers using the decimal number system, whereas computers use the binary number system. We need to be able to readily shift between the binary and decimal number representations. Converting a Binary Number to a Decimal Number To convert a binary number to a decimal number, we simply write the binary number as a sum of powers of 2. For example, to convert the binary number 0 to a decimal number, we note that the rightmost position is the ones position and the bit value in this position is a. So, this rightmost bit has the decimal 0 value of 2. The next position to the left is the twos position, and the bit value in this position is also a. So, this next bit has the decimal value of 2. The next position to the left is the fours position, and the bit value in this position is a 0. The leftmost position is the eights position, and the bit value in this 3 position is a. So, this leftmost bit has the decimal value of 2. Thus: Express the binary number 00 as a decimal number. As a shorthand means of converting a binary number to a decimal number, simply write the position value below each bit (i.e., write a below the rightmost bit, then a 2 below the next bit to the left, then a 4 below the next bit to the left, etc.), and then add the position values for those bits that have a value of. For example, to convert the binary number 00 to decimal, we annotate the position values below the bit values: Then we add the position values for those positions that have a bit value of : = 2. Thus Express the binary number as a decimal number. 4

5 Given a binary number, you can now convert it to the equivalent decimal number. We will now present two different methods for converting in the other direction: from decimal to binary. The first method is more intuitive. The second method is much more readily adaptable to programming on a computer. Converting a Decimal Number to a Binary Number: Method The first method of converting from a decimal number to a binary number entails expressing the decimal number as a sum of powers of 2. To convert the decimal number x to binary: Step. Find the highest power of two less than or equal to x. The binary representation will have a one in this position. Denote the value of this highest power of 2 as y. Step 2. Now subtract this power of two (y) from the decimal number (x), denoting the result as z: z x y. Step 3. If z 0, you are done. Otherwise, let x z and return to Step above. Convert the decimal number 78 to binary. Think to yourself: Self, what is the largest power of 2 that is less than or equal to 78? So, the largest power of 2 that is less than 78 is. Thus the binary representation of 78 will have What is the largest power of 2 that is less than or equal to The answer:

6 What is the largest power of 2 that is less than or equal to? The answer: Now, subtracting 4 from our number 6 gives Thus, 2 is now the number we are working with. What is the largest power of 2 that is less than or equal to 2? Now, subtracting 2 from our number 2 gives 0, so we are done. Filling in zeros in all remaining position (i.e., all positions that do not have a ), we have our answer: The decimal number 78 in binary is Convert the decimal number 20 to binary. 6

7 You should memorize the binary representations of the decimal digits 0 through 5 shown below. Decimal Number Binary Number Decimal Number Binary Number You may be wondering about the leading zeros in the table above. For example, the decimal number 5 is represented in the table as the binary number 00. We could have represented the binary equivalent of 5 as 0, 000, , or with any other number of leading zeros. All answers are correct. Sometimes, though, you will be given the size of a storage location. When you are given the size of the storage location, include the leading zeros to show all bits in the storage location. For example, if told to represent decimal 5 as an 8-bit binary number, your answer should be Converting a Decimal Number to a Binary Number: Method 2 The second method of converting a decimal number to a binary number entails repeatedly dividing the decimal number by 2, keeping track of the remainder at each step. To convert the decimal number x to binary: Step. Divide x by 2 to obtain a quotient and remainder. The remainder will be 0 or. Step 2. If the quotient is zero, you are finished: Proceed to Step 3. Otherwise, go back to Step, assigning x to be the value of the most-recent quotient from Step. Step 3. The sequence of remainders forms the binary representation of the number. Convert the decimal number 53 to binary using the second method described above. 7

8 Note that the remainder from the very first division of the decimal number by two provides the least significant bit (i.e., the rightmost bit) in the binary representation. The remainder from each division then provides successive bits, from right to left. The remainder of the final division (which will always be ) will provide the most significant bit (i.e., the rightmost bit) in the binary representation. Convert the decimal number 20 to binary. The full set of calculations is shown below. You may find the second method easier to use than the first, but you might be thinking: Why does this work? An explanation of why this algorithm works is presented in Appendix -. So, now you should be comfortable going back and forth between binary and decimal representations. Given a decimal number, convert it to binary Decimal number Binary number Given a binary number, convert it to decimal.4 Binary Addition We are familiar with adding decimal (base-0) numbers. But how do we add binary numbers? Consider the equation you encountered in first grade: + = 2 If you converted each decimal number in this equation to binary, the result would be: + = 0 8

10 + Addition of multi-bit binary numbers is accomplished using the results above, on a column-by-column basis. That is, for each column, use the results: = = + = 0 with a carry of to the left + + = with a carry of to the left For instance, consider the addition of the two binary numbers and 0: + 0?? Starting with the right column, + results in 0, with a carried to the left: + 0?0 Now, in the left column, we are adding + + 0, which results in 0, with a carried to the left: Finally, we consider the leftmost column (which consists of just the carryover from the column to its right), resulting in: Perform the addition of the binary numbers:

11 Suppose we use 4 bits to store integers. Show the addition of the decimal numbers in binary..5 Overflow Your friend has written a computer program that initializes a natural number (i.e., a nonnegative integer) to the number 4,294,967,293 and then successively adds to the number, printing the result to the screen. He believes that his program must have an error since it produces the results shown below. He asks for your help. Putting aside the obvious question Why would your friend have written this program?, you decide to help. You notice that the program seems to start out well, adding one and printing out the correct result for the first two iterations, but then, upon reaching the value 4,294,967,295, the addition of one seems to reset the value back to zero. The program then seems to resume normal operation, adding one and printing out the correct result. What s going on here?

12 To explore this problem, first consider a computer that uses 4 bits to store integers. The number 5 would be stored as. What would be the result of the calculation 5 + in binary? Performing binary addition: The result appears to be 0000 which would seem to be correct, since this is, after all, equivalent to 6 in decimal, and that is the right result for 5 +. Except that this would not be the answer the computer would supply! The correct answer to the binary addition, 0000, requires five bits. But the computer (in our example) stores all integers in four bits. All bits beyond the rightmost four bits are discarded. So, the answer to 5 + in binary on our 4-bit computer would be zero (i.e., 0000). This scenario, where an answer requires more bits than the computer has available, is called overflow. Consider a computer that uses 4 bits to store integers. Show the binary calculation of Since only the rightmost four bits are retained, the answer would be 000. This is, of course, incorrect, since overflow has occurred. Overflow in the storage of binary numbers is a real practical problem, and has been the bane of many a programmer. The most visually spectacular overflow error occurred in 996 when the European Space Agency s Ariane 5 rocket exploded 37 seconds into its maiden launch, sending \$500 million dollars into oblivion. The programmers asked an on-board computer to store a 64-bit velocity in a 6-bit space. Only the rightmost 6-bits were retained. The rocket attempted to respond to the erroneous velocity, swerving itself into disintegration. So, if a computer stores positive integers in a certain number of bits, what is the largest number that can be stored before overflow occurs? Using 3 bits the largest binary integer that can be stored is: Using 4 bits the largest binary integer that can be stored is: Using 5 bits the largest binary integer that can be stored is: We would be tempted to conclude that using n bits the largest binary integer that can be stored is: 2

13 This is in fact correct, but the above argument is not a proof you should be comfortable with. To determine the largest number that can be stored in n bits, first consider the largest number that can be stored in 4 bits: position position position position Note that the most significant bit position is the 2 3 position. If we add to this number (and ignore the fact that overflow will occur), the result will be Converting this to decimal is easy: There is only 4 4 a single in the 2 position. So, one number larger than is equal to 2. So must be equal to 2 4. More generally, the most significant bit position in an n-bit number will be the 2 n position. The largest number that can be stored in n bits will be a string of n ones (where the leftmost bit is in the 2 n position). Now, if we add to this string of n ones (and ignore the fact that overflow will occur), the result will be a single in the 2 n position, followed by zeros. So, one number larger than the largest number that can be stored in n bits is equal to 2 n. So, the largest number that can be stored in n bits is 2 n. What is the largest positive integer that can be stored on a computer if the computer stores positive integers in four bytes? Can you now inform your friend about the problem in his program?.5 Negative Binary Numbers We need to represent negative integers also. How do we handle that? You might be tempted to reply: Easy, just use a negative sign! But this won t work. Remember: everything must be represented as bits that is, ones and zeros! A negative sign is neither a one nor a zero. The most intuitive solution might be the sign and magnitude representation. With this notation: Let the leftmost bit represent the sign, say 0 for positive and for negative. The remaining bits represent the magnitude. 3

14 For example, suppose we store integers in four bits with the sign and magnitude scheme. Then 3 would be stored as and 2 would be stored as As appealing as this scheme might seem at first, it is not used. To see why, consider the addition of 3 and 2. Using addition in the typical way, we would see But So, addition is not straightforward if the signs of the two arguments differ. To make the sign-magnitude scheme work, think about what you would need to do: You would have to first determine which of the two arguments has the larger magnitude (ignoring the sign bit) You would then subtract the small magnitude from the larger magnitude You would then attach to this result the sign of the quantity that had the higher magnitude While this could be made to work, the resulting hardware would be unnecessarily complex. As a further annoyance with this scheme, it has two representations for zero: (It took mathematicians over a thousand years before they could handle the concept of zero Surely we should pause before casually introducing a system with two zeros!) The Two s Complement Notation All computers represent integers in a manner that allows both positive and negative numbers. To represent positive numbers, simply use its binary representation, as we have done before. Negative binary numbers are represented in what is called two s complement notation. To find the two s complement of a binary number, change each to a zero and each zero to a one (i.e., invert all the bits), then add one to this quantity. What is the two s complement of the binary number 00000? 4

15 So how do we find the representation of a negative decimal number? Do the following: First find the binary representation of the number without the negative sign Then take the two s complement. The result is the representation of the negative number. Express the decimal integer 3 as an eight bit binary number. Express the decimal integer 53 as an eight bit binary number. Suppose we store integers in 4 bits. Represent in two s complement notation. There is a neat shortcut to find the two s complement of a binary number. Starting at the right, and moving to the left, leave all bits unchanged until the first is encountered. Leaving this very first unchanged, continue moving to the left inverting all bits from that point onward. For instance, we noted above that the decimal number +53 in binary is To find the two s complement, we start at the right and move to the left, stopping at the first that we encounter, which in this case happens to be the rightmost bit. We leave this bit unchanged, but invert all other bits to the left, resulting in

16 Use the shortcut technique to determine the two s complement representation of -92 using 8 bits You are likely wondering: Why is the two s complement notation a good representation for negative numbers? Why do we flip all the bits and add one instead of, say, flipping half the bits and adding 5? Here s why: A binary number, added to its two s complement, results in zero. This is how its sposed to be: a number added to its negative should give zero. For example, let s presume integers are represented using 8 bits. Back in Section.3 you determined that the binary representation of 53 was Two examples back you determined that 53 was 000. Let s add 53 to 53: 53: : If we are only using 8 bits, then only the eight least significant bits are retained, and the result is zero (as it should be). If we represent negative numbers using two s complement notation, then binary addition involving negative numbers will give the correct result. Every computer today uses two s complement notation for the storage of integers. Suppose a computer stores integers in 4 bits using two s complement notation. Show the calculation You may agree that if we represent negative numbers using two s complement notation, then binary addition involving negative numbers seems to give the correct results, but you might be thinking: Why does this work? An explanation of why this algorithm works is presented in Appendix -2. 6

17 .6 Two s Complement: A Closer Look Suppose we have a computer that stores integers in four bits. If we only have non-negative integers, then we can represent the integers 0 5 using four bits: Decimal Number Binary Number Note that we are limited to 6 possible four-bit strings. These 6 unique strings are shown in the right column of the table above. Since we have 6 unique 4-bit strings possible, we can represent 6 unique decimal numbers. These 6 decimal numbers (0 5) are shown in the left column of the table above. The assignment of decimal number to bit string is performed by the usual decimal to binary conversion. Now, suppose we still want to restrict ourselves to storing integers in four bits, but we want to include both positive and negative integers (using two s complement notation, since we know that works!). What integers can we now store, if only four bits are available? It should be clear that we cannot store the integers 5 to +5 within our 4-bit space. The range 5 to +5 comprises 3 unique integers, but since we have only 6 possible bit strings available, we can only store 6 unique integers within our four bit allotment. You should agree that we should store at least the integers 7 to +7. But this range will comprise 5 integers, and we have the ability to store sixteen so there is room for one more! Should it be +8? Or should it be 8? It can t be both. Let s begin by filling in the integers 0-7: Decimal Number Binary Number

18 Let s fill in the range of integers from to 7 one integer at a time. Starting with, we determine that this integer is represented by in 2 s complement notation, and we have: Decimal Number Binary Number Moving on to 2, we determine that this integer is represented by 0 in 2 s complement notation: Decimal Number Binary Number Adding the two s complement representations for 3, 4, 5, 6 and 7, we have: Decimal Number Binary Number

19 We have one bit string left: 000. Should this be +8 or 8? It would be easy to have this string, 000, represent +8. After all, in binary, +8 is equal to 000. But let s consider 8. In two s complement notation this integer is represented by 000! So, we really do have a choice: we can let our last bit string 000 be either +8 or 8. Both would work. But one choice is much better than the other! Look carefully at the table above: For all the positive numbers, the most significant bit in the four-bit string is a zero. For all the negative numbers, the most significant bit in the four-bit string is a one. If we assign the remaining bit string (000) to the integer 8, it will continue to be the case that the most significant bit in the four-bit string is a one for all negative numbers and a zero for all positive numbers. This is very handy we can immediately tell if a number represents a positive or negative integer just by examining the most significant bit! This is the way to go! The final assignment is: Decimal Number Binary Number To summarize: If we use four bits to store integers using two s complement notation, the range of integers that can be stored is 8 through +7, and, given the four-bit binary number, we can immediately tell if it is positive or negative by looking at the leftmost bit. If the leftmost bit is a 0, the number is positive. If the leftmost bit is a, the number is negative. How do we reverse the two s complement process; i.e., given that a 4-bit two s complement number is stored as, say, 0, how can I easily determine that the bit string is storing the decimal value -5? To determine the decimal equivalent of a number stored in two s complement notation, perform the following: If the leftmost bit is a 0, the number is positive. Simply convert the bit string to a decimal number. If the leftmost bit is a, the number is negative. To determine the decimal number: o Take the two s complement of the bit string (i.e., flip all the bits and add one) o Convert the bit string to a decimal number o Append a negative sign to the result. 9

20 Suppose we store integers in 4 bits using two s complement notation. What is the decimal representation of the number stored as? Suppose we store integers in 4 bits using two s complement notation. What is the decimal representation of the number stored as 00? The foregoing results presumed that we were storing integers in two s complement notation using 4 bits, but the results can be easily generalized to the case where we store integers in two s complement notation using n bits. What is the largest positive integer that can be stored in n bits using two s complement notation? What is the smallest negative integer that can be stored in n bits using two s complement notation? We summarize important results. If we store integers in two s complement notation using n bits: The left most bit functions as a sign bit. If the leftmost bit is a 0, the number is positive; if the leftmost bit is a, the number is negative. The range of values that can be stored is Regardless of the number of bits used, the number zero is always represented as 20

21 Regardless of the number of bits used, the number is always represented as Regardless of the number of bits used, the most positive number is: Regardless of the number of bits used, the most negative number is: What is the decimal equivalent of this 32-bit two s complement number? 00 Show the calculation in 4-bit two s complement notation. Convert the answer back to decimal to confirm your answer is correct. Show the calculation in 4-bit two s complement notation. Convert the answer back to decimal to confirm your answer is correct. 2

22 Show the calculation 6 + ( 3 ) in 4-bit two s complement notation. Convert the answer back to decimal to confirm your answer is correct. Overflow is recognized when we add 2 numbers of the same sign and get a result of the opposite sign..7 Binary Subtraction Subtraction in binary entails nothing new! To compute a b, we compute a + ( b) where b is represented using two s complement notation. Show the subtraction 3 2 in a two s complement computer that stores integers in 4 bits. Suppose we use six bits to represent a two s complement binary number. Do the following subtraction Show the subtraction above with all numbers converted to decimal, and explain your results. 22

27 .9 Representation of Characters You now know how positive and negative integers are represented within the hardware of a computer. We now address the representation of characters, such as letters of the alphabet, punctuation signs and other assorted symbols (e.g., \$, %,?, etc.). Characters are stored within the computer using the American Standard Code for Information Interchange code the ASCII code shown in the table below. ASCII Hex Symbol ASCII Hex Symbol ASCII Hex Symbol ASCII Hex Symbol A B C D E F NUL SOH STX ETX EOT ENQ ACK BEL BS TAB LF VT FF CR SO SI A B C D E F DLE DC DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US A 2B 2C 2D 2E 2F (space)! " # \$ % & ' ( ) * +, -. / A 3B 3C 3D 3E 3F : ; < = >? ASCII Hex Symbol ASCII Hex Symbol ASCII Hex Symbol ASCII Hex Symbol A 4B 4C 4D 4E A B C D E F G H I J K L M N O A 5B 5C 5D 5E 5F P Q R S T U V W X Y Z [ \ ] ^ _ A 6B 6C 6D 6E 6F ` a b c d e f g h i j k l m n o A 7B 7C 7D 7E 7F p q r s t u v w x y z { } ~ 27

28 Each ASCII symbol is shown with both its hexadecimal representation and its base-0 representation. Suppose we wanted to know how the symbol for the question mark is stored internally within the computer. Scanning the table for the question mark, we note that its hexadecimal value is 3F. Converting this hexadecimal value to binary, we conclude that the question mark is stored as 00. How is the letter t stored in memory? Suppose you use super-hero powers to look into a memory location and you see: What is the meaning of the quantity stored at this location? If you convert this binary value to an integer, you would conclude that the integer 6 is stored in this location. On the other hand, looking at the ASCII table, you could conclude that the character t is stored at this location. Which is correct? The meaning of each piece of data stored within a computer is defined by the programmer. For example, suppose the programmer is using a variable named midcode to store a value. If the programmer intends this value to be an integer that is equal to 6, he might include the line of code: int midcode = 6; On the other hand, if the programmer intends the value to be the character t, he would instead use this line of code: char midcode = t ; In both cases, the data is stored as The computer will interpret the data according to the instructions provided by the programmer. If the programmer has instructed the computer to interpret midcode to be an integer, then the bit string 0000 will be interpreted as the integer 6. On the other hand, if the programmer has instructed the computer to interpret midcode to be a character, then the bit string 0000 will be interpreted as the letter t..0 Binary-Coded Decimal We close with a brief overview of a different manner of converting between binary and decimal. In some practical applications we will use a digital logic circuit to drive a numeric display, where each individual display unit displays a single digit. So, for example, we might have the number 472 in our logic circuit, and we would like to display this on three separate display units (one for the 4, one for the 7 and one for the 2). Working with this sort of display hardware is facilitated through the use of binary-coded decimal (BCD), where each individual digit is represented by a 4-bit number. For example, to represent the decimal number 472 in binary-coded decimal (BCD), we convert each digit to a four bit binary number, independent of the other decimal digits. Thus, 472 equal in BCD. 28

29 Problems. Convert the following binary numbers to decimal number: (a) 00 (b) 00 (c) (d).2 Convert the following decimal numbers to binary: (a) 50 (b) 00 (c) 28 (d) Perform the addition of the following unsigned (i.e., not two s complemented) binary numbers: (a) (b) 0 (c) Suppose that unsigned numbers are stored in five bits. Perform the following additions, indicating which additions produce overflow. (a) 00 (b) 000 (c) Suppose we use 6 bits to store integers. Show the following additions in binary: (a) (b) (c) + 3 (d) Express the following numbers as 8-bit binary numbers in two s complement notation: (a) 60 (b) -60 (c) (d) - (e) 0 (f) 2 (g) -5 (h)

30 .7 Convert the following six-bit two s complement numbers to decimal: (a) 00 (b) 0 (c) 0 (d) Show each of the following calculations in 4-bit two s complement notation. In each case, convert the result (in binary) back to a decimal number. (a) (b) (c) 6 4 (d) Suppose we use six bits to represent a two s complement binary number. (a) (b) (c) What is the largest number that can be represented? What is the smallest number that can be represented? How many total base-0 numbers can be represented?.0. Suppose we use six bits to represent a two s complement binary number. Perform the following additions, indicating when overflow occurs: (a) 000 (b) (c) 000 (d) Suppose we use six bits to represent a two s complement binary number. Perform the following subtractions, indicating when overflow occurs: (a) 000 (b) (c) 000 (d)

31 .2 Convert the following binary number to hexadecimal: (a) (b) (c) (d) 00.3 Convert the following hexadecimal numbers to binary: (a) ABCD (b) (c) 0 (d) 23AC.4 How many bits are needed to represent: (a) (b) (c) the 26 letters of the alphabet the individual cards in a deck of playing cards the faces on a pair of dice.5 Convert the decimal number 500 to BCD. 3

### 6 3 4 9 = 6 10 + 3 10 + 4 10 + 9 10

Lesson The Binary Number System. Why Binary? The number system that you are familiar with, that you use every day, is the decimal number system, also commonly referred to as the base- system. When you

### Number Systems, Base Conversions, and Computer Data Representation

, Base Conversions, and Computer Data Representation Decimal and Binary Numbers When we write decimal (base 10) numbers, we use a positional notation system. Each digit is multiplied by an appropriate

### Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

Numeral Systems Which number is larger? 25 8 We need to distinguish between numbers and the symbols that represent them, called numerals. The number 25 is larger than 8, but the numeral 8 above is larger

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

### plc 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;

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

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

### School for Professional Studies UNDERGRADUATE PROGRAM COMPUTER SCIENCE FUNDAMENTALS SUPPLEMENTAL COURSE MATERIALS CS208-00T

School for Professional Studies UNDERGRADUATE PROGRAM COMPUTER SCIENCE FUNDAMENTALS SUPPLEMENTAL COURSE MATERIALS CS208-00T Table of Contents Suggested 8-week Schedule... Chapter 1: NUMBERING SYSTEMS AND

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

### Bits, Data Types, and Operations. University of Texas at Austin CS310H - Computer Organization Spring 2010 Don Fussell

Bits, Data Types, and Operations University of Texas at Austin CS3H - Computer Organization Spring 2 Don Fussell How do we represent data in a computer? At the lowest level, a computer is an electronic

### Introduction to Computers and Programming

16.070 Introduction to Computers and Programming March 14 Recitation 6 Spring 2002 Topics: Quick review of PS4 issues Fundamental Data types ASCII / Arithmetic Conversion Number Systems / Logical Operation

### Chapter 4. Binary Data Representation and Binary Arithmetic

Christian Jacob Chapter 4 Binary Data Representation and Binary Arithmetic 4.1 Binary Data Representation 4.2 Important Number Systems for Computers 4.2.1 Number System Basics 4.2.2 Useful Number Systems

### Memory is implemented as an array of electronic switches

Memory Structure Memory is implemented as an array of electronic switches Each switch can be in one of two states 0 or 1, on or off, true or false, purple or gold, sitting or standing BInary digits (bits)

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

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

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

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

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

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

### Part 1 Theory Fundamentals

Part 1 Theory Fundamentals 2 Chapter 1 Information Representation Learning objectives By the end of this chapter you should be able to: show understanding of the basis of different number systems show

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

### P A R T DIGITAL TECHNOLOGY

P A R T A DIGITAL TECHNOLOGY 1 CHAPTER NUMBERING SYSTEMS 1.0 INTRODUCTION This chapter discusses several important concepts including the binary, octal and hexadecimal numbering systems, binary data organization

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

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

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

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

### The largest has a 0 in the sign position and 0's in all other positions:

10.2 Sign Magnitude Representation Sign Magnitude is straight-forward method for representing both positive and negative integers. It uses the most significant digit of the digit string to indicate the

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

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

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

### After studying this lesson, you will gain a clear understanding on, Binary, Octal, Decimal and hexadecimal number systems

After studying this lesson, you will gain a clear understanding on, various number systems Binary, Octal, Decimal and hexadecimal number systems conversions among number systems units used in measuring

### DIGITAL NUMBERING SYSTEM

SUBCOURSE IT0339 EDITION B US ARMY INTELLIGENCE CENTER DIGITAL NUMBERING SYSTEM DIGITAL NUMBERING SYSTEMS Subcourse Number IT0339 EDITION B US ARMY INTELLIGENCE CENTER Fort Huachuca, AZ 85613-6000 2 Credit

### Lecture 2 - POGIL Activity

15213 - Lecture 2 - POGIL Activity Introduction In this activity you will learn about binary numbers. This activity was based on material developed by Professor Saturnino Garcia of the University of San

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

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

### Discrete mathematics is the study of techniques, ideas and modes

CHAPTER 1 Discrete Systems Discrete mathematics is the study of techniques, ideas and modes of reasoning that are indispensable in applied disciplines such as computer science or information technology.

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

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

### CHAPTER 3 Numbers and Numeral Systems

CHAPTER 3 Numbers and Numeral Systems Numbers play an important role in almost all areas of mathematics, not least in calculus. Virtually all calculus books contain a thorough description of the natural,

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

### We Use High Level Languages. HLL Assembly Language. Assembly Language Machine Language. Machine Language Inputs to Digital System

We Use High Level Languages High Level Language temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; There are many high level languages (HLLs) Java, C, C++, C#, Fortran, Basic, Pascal, Lisp, Ada, Matlab, etc. HLLs

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

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

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

### Chapter 1. Binary, octal and hexadecimal numbers

Chapter 1. Binary, octal and hexadecimal numbers This material is covered in the books: Nelson Magor Cooke et al, Basic mathematics for electronics (7th edition), Glencoe, Lake Forest, Ill., 1992. [Hamilton

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

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

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

### Number Systems. In primary school, we would have learned the place values like this: Digit Contributed value = 8000

Number Systems The Decimal (Denary) System A good understanding of other number systems depends on a good understanding of the decimal system that you have used for counting and arithmetic since you started

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

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

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

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

STUDENT COPY DIGITAL & MICROPROCESSORS 3 CHAPTER 1 BINARY SYSTEM Base Conversion: A number a n, a n 1 a 2, a 1 a 0 a 1 a 2 a 3 expressed in a base r system has coefficient multiplied by powers of r. n

### ASCII Code. Numerous codes were invented, including Émile Baudot's code (known as Baudot

ASCII Code Data coding Morse code was the first code used for long-distance communication. Samuel F.B. Morse invented it in 1844. This code is made up of dots and dashes (a sort of binary code). It was

### Number Representation

Number Representation COMP375 Computer Organization and darchitecture t How do we represent data in a computer? At the lowest level, a computer is an electronic machine. works by controlling the flow of

### Data Representation Methods in the Computer system

3 Data Representation Methods in the Computer system In this unit you will learn, ² computer data representation, ² Decimal, Binary, Octal and Hexadecimal number systems, ² most and least significant positional

### Chapter 3 DATA REPRESENTATION. 3.1 Character Representation

Chapter 3 DATA REPRESENTATION Binary codes are used to represent both characters and numbers inside computers. Moreover, the binary codes used to represent numbers must be consistent with the arithmetic

### Chapter 5. Binary, octal and hexadecimal numbers

Chapter 5. Binary, octal and hexadecimal numbers A place to look for some of this material is the Wikipedia page http://en.wikipedia.org/wiki/binary_numeral_system#counting_in_binary Another place that

### Note that the exponents also decrease by 1 with each column move to the right, so the

Base Systems Jacqueline A. Jones People use the decimal number system to perform arithmetic operations. Computers, on the other hand, use the binary system, which contains only two digits: 0 and 1. We

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

### To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

Binary Numbers In computer science we deal almost exclusively with binary numbers. it will be very helpful to memorize some binary constants and their decimal and English equivalents. By English equivalents

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

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

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

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

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

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

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

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

### Review of Number Systems Binary, Octal, and Hexadecimal Numbers and Two's Complement

Review of Number Systems Binary, Octal, and Hexadecimal Numbers and Two's Complement Topic 1: Binary, Octal, and Hexadecimal Numbers The number system we generally use in our everyday lives is a decimal

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

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

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

### Numbers represented using groups of bits (1s and 0s) are said to be BINARY NUMBERS. Binary numbers are said to be in base 2.

DATA REPRESENTATION All data used by computers is in code form, based on the two digits 0 and 1. This is so, in order to reflect the two-state components of which these digital systems are made. Numbers

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

### Lab 1: Information Representation I -- Number Systems

Unit 1: Computer Systems, pages 1 of 7 - Department of Computer and Mathematical Sciences CS 1408 Intro to Computer Science with Visual Basic 1 Lab 1: Information Representation I -- Number Systems Objectives:

### Lab 1: Information Representation I -- Number Systems

Unit 1: Computer Systems, pages 1 of 7 - Department of Computer and Mathematical Sciences CS 1410 Intro to Computer Science with C++ 1 Lab 1: Information Representation I -- Number Systems Objectives:

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

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

### 13. NUMBERS AND DATA 13.1 INTRODUCTION

13. NUMBERS AND DATA 13.1 INTRODUCTION Base 10 (decimal) numbers developed naturally because the original developers (probably) had ten fingers, or 10 digits. Now consider logical systems that only have

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

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

### A Short Introduction to Binary Numbers

A Short Introduction to Binary Numbers Brian J. Shelburne Department of Mathematics and Computer Science Wittenberg University 0. Introduction The development of the computer was driven by the need to

### Binary Numbers. X. Zhang Fordham Univ.

Binary Numbers X. Zhang Fordham Univ. 1 Numeral System! A way for expressing numbers, using symbols in a consistent manner.!! "11" can be interpreted differently:!! in the binary symbol: three!! in the

### NUMBER SYSTEMS. William Stallings

NUMBER SYSTEMS William Stallings The Decimal System... The Binary System...3 Converting between Binary and Decimal...3 Integers...4 Fractions...5 Hexadecimal Notation...6 This document available at WilliamStallings.com/StudentSupport.html

### Section 5.3: GS1-128 Symbology Specifications

Section 5.3: Table of Contents 5.3.1 Symbology Characteristics...3 5.3.1.1 GS1-128 Symbology Characteristics...3 5.3.2 GS1-128 Bar Code Symbol Structure...4 5.3.3 GS1-128 Symbology Character Assignments...5

### NUMBER SYSTEMS APPENDIX D. You will learn about the following in this appendix:

APPENDIX D NUMBER SYSTEMS You will learn about the following in this appendix: The four important number systems in computing binary, octal, decimal, and hexadecimal. A number system converter program

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

### 1 / 40. Data Representation. January 9 14, 2013

1 / 40 Data Representation January 9 14, 2013 Quick logistical notes In class exercises Bring paper and pencil (or laptop) to each lecture! Goals: break up lectures, keep you engaged chance to work through

### Two s Complement Arithmetic

Two s Complement Arithmetic We now address the issue of representing integers as binary strings in a computer. There are four formats that have been used in the past; only one is of interest to us. The

### COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

### Extra Handout No 2 By Dr Sheikh Sharif Iqbal. Microprocessors. - To introduce basic architectures of microprocessors

Extra Handout No 2 By Dr Sheikh Sharif Iqbal Ref: 'Online course on EE-390', KFUPM Microprocessors Objective: - To review the evolution of microprocessors - To introduce basic architectures of microprocessors

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

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

### Sessions 1, 2 and 3 Number Systems

COMP 1113 Sessions 1, 2 and 3 Number Systems The goal of these three class sessions is to examine ways in which numerical and text information can be both stored in computer memory and how numerical information

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