QUIZ ch.1. 1 st generation 2 nd generation 3 rd generation 4 th generation 5 th generation Rock s Law Moore s Law

 Erik Banks
 4 months ago
 Views:
Transcription
1 QUIZ ch.1 1 st generation 2 nd generation 3 rd generation 4 th generation 5 th generation Rock s Law Moore s Law Integrated circuits Density of silicon chips doubles every 1.5 yrs. Multicore CPU Transistors Cost of manufacturing infrastructure doubles every 4 yrs. Vacuum tubes VLSI
2 QUIZ ch.1 The highest # of transistors in a CPU commercially available today is about: 100 million 500 million 1 billion 2 billion 2.5 billion 5 billion
3 QUIZ ch.1 The highest # of transistors in a CPU commercially available today is about: 100 million 500 million 1 billion 2 billion 2.5 billion As of 2012, the highest transistor count in a commercially available CPU is over 2.5 billion transistors, in Intel's 10core Xeon WestmereEX. Xilinx currently holds the "worldrecord" for an FPGA containing 6.8 billion transistors. Source: Wikipedia Transistor_count
4 Chapter 2 Data Representation in Computer Systems
5 2.1 Introduction A bit is the most basic unit of information in a computer. It is a state of on or off in a digital circuit. Sometimes these states are high or low voltage instead of on or off.. A byte is a group of eight bits. A byte is the smallest possible addressable unit of computer storage. The term, addressable, means that a particular byte can be retrieved according to its location in memory. 5
6 2.1 Introduction A word is a contiguous group of bytes. Words can be any number of bits or bytes. Word sizes of 16, 32, or 64 bits are most common. Intel: 16 bits = 1 word, 32 bits = double word, 64 bits = quad word In a wordaddressable system, a word is the smallest addressable unit of storage. 6
7 QUIZ A word is a contiguous group of bytes. Words can be any number of bits or bytes. Word sizes of 16, 32, or 64 bits are most common. Intel: 16 bits = 1 word, 32 bits = double word, 64 bits = quad word In a wordaddressable system, a word is the smallest addressable unit of storage. Does the word size belong to the organization or architecture of a computer? 7
8 QUIZ What is the word size in the MARIE architecture?
9 The meaning of full nbit computer (8, 16, 32, 64 etc.) 9 All datarelated operations must be performed on n bits: Word size n bits MBR, AC n bits ALU n bits Data bus n bits / cycle n bit 1 transf./cycle n/2 bit 2 transf./cycle etc. Usually InReg, OutReg
10 The meaning of nbit computer (8, 16, 32, 64 etc.) However, not all parameters of the computer need be exactly n bits: Opcode length Address length, PC, MAR Instruction length, IR It s even variable in CISC! 10
11 A group of four bits is called a nibble. (nybble??) Bytes consist of two nibbles: a highorder nibble, and a loworder nibble. In each case, find the ho and lo nibble: (binary) E7 (hex) 42 (dec) 325 (oct) 2.1 Introduction 11
12 2.2 Positional Numbering Systems Bytes store numbers using the position of each bit to represent a power of 2. The binary system is also called the base2 system. Our decimal system is the base10 system. It uses powers of 10 for each position in a number. Any integer quantity can be represented exactly using any base (or radix). 12
13 2.2 Positional Numbering Systems The decimal number 947 in powers of 10 is: The decimal number in powers of 10 is:
14 2.2 Positional Number Systems The binary number in powers of 2 is: = = 25 When the radix of a number is something other than 10, the base is denoted by a subscript. Sometimes, the subscript 10 is added for emphasis: =
15 2.3 Converting Between Bases Converting unsigned integers Two algorithms: 1.Topdown = repeated subtraction 2.Bottomup = repeated division (and remainder) 15
16 Converting Repeated subtraction Example: convert the decimal number 190 to base 3. First question: how many digits are needed? A: 3 5 = 243 > 190 so our result will be less than five digits wide. The largest power of 3 that we need is therefore 3 4 = 81. How many times does 81 fit inside 190? A: 81 2 = 162. Write down the 2 and subtract from 190, giving 28.
17 Then repeat for the quantity that was left over: The next power of 3 is 3 3 = 27. We ll need one of these, so we subtract 27 and write down the numeral 1 in our result. The next power of 3, 3 2 = 9, is too large, but we have to assign a placeholder of zero and carry down the 1. 17
18 Continue until 3 0 (=1, a.k.a. units): 3 1 = 3 is again too large, so we assign a zero placeholder. The last power of 3, 3 0 = 1, is our last choice, and it gives us a difference of zero. Our result, reading from top to bottom is: =
19 19 Extracredit QUIZ
20 Converting: repeated division Converting 190 to base 3... Our result, reading from bottom to top is: =
21 QUIZ Convert the decimal number 462 to base 5 using repeated division. 21
22 2.3 Converting Between Bases Converting unsigned fractions Fractional values can be approximated in all base systems. Unlike integes, fractions do not necessarily have exact representations under all bases. E.g. ½ (0.5 dec) is exactly representable in the binary and decimal systems, but not in base 3) 22
23 2.3 Converting Between Bases decimal point radix point Digits to the right of a radix point represent negative powers of the radix: = = = ½ + ¼ = =
24 2.3 Converting Between Bases As with integer conversions, we can use two methods: Repeated subtraction Repeated multiplication 24
25 Fractions: repeated subtraction Identical to the subtraction method for positive integers. Instead of subtracting positive powers of the target radix, we subtract negative powers of the radix. We always start with the largest value first, R 1, and work our way along using larger negative exponents. 25
26 Fractions: repeated subtraction Example: convert the decimal to binary. Our result, reading from top to bottom is: = Works with any base, not just binary! 26
27 Fractions: repeated subtraction QUIZ: convert the decimal 0.3 to binary. 27
28 Fractions: repeated multiplication Example: convert the decimal to binary First we multiply by the radix 2. The one in the units place is the first binary digit 28
29 Fractions: repeated multiplication Converting to binary... Ignoring the value in the units place, we continue multiplying each fractional part by the radix. 29
30 Fractions: repeated multiplication Converting to binary... We are finished when the product is zero, or we have reached the desired number of binary places. Reading bits from top to bottom: = This method also works with any base. Just use the target base as the multiplier. 30
31 Your turn! Convert the decimal 0.3 to binary by repeated multiplication. Use 8 bits of precision. 31
32 Individual work for next time Read pp of text Follow and understand examples 2.1 through 2.8 Solve in notebook endofchapter Ex.1 (p.117) 32
33 Larger Bases The binary numbering system is the most important radix system for digital computers. However, it is difficult to read long strings of binary numbers  and even a modestlysized decimal number becomes a very long binary number. For example: =
34 The 6bit computers: Motivated by the 6bit codes for printable graphic patterns common in the U.S. Army and Navy 6, 18, 26, 36, 48bit words Some history: 18Bit Computers from DEC 36bit Wikipedia Edged out of the market by the need for floatingpoint IBM System/360 (1965) 8bit microprocessors (1970s) 34 Octal an Evolutionary deadend?
35 Octal an Evolutionary deadend? Unisys is still successful with their 36 and 48 bit machines : Clearpath Dorado line of 36bit CISC highend servers Clearpath Libra line of 48bit mainframes although they are being transitioned to Intel Xeon chips (64bit): see article 35
36 Hexadecimal For compactness and ease of reading, binary values are usually expressed using the hexadecimal (base 16) number system. The hex digits: 0 9, A, B, C, D, E, F It is easy to convert between base 16 and base 2, because 16 = 2 4 onetoone correspondence between hex digits and groups of four bits A group of four binary digits is called a nibble or a hextet 36
37 Converting Between Bases which are powers of 2 is easy! Using hextets, the binary number (= ) in hexadecimal is: If the number of bits is not a multiple of 4, pad on the left with zeros. Octal (base 8) values are derived from binary by using groups of three bits (8 = 2 3 ): Octal was very useful when computers used sixbit words. 37
38 QUIZ: Convert from hex to octal? 2 A F 16 = 8 38
39 Operations with unsigned integers Addition Subtraction Multiplication Division They can all be performed with pencil and paper exactly as in decimal (carry, borrow, long division, etc.) 39
40 Operations with unsigned integers Addition Subtraction Multiplication Division Example: : 101 They can all be performed with pencil and paper exactly as in decimal (carry, borrow, long division, etc.) 40
41 2.4 Signed Integer Representation To represent signed integers, computer use the highorder bit to indicate the sign of a number. The highorder bit is the leftmost bit, a.k.a. the most significant bit (MSB). An MSB of 0 indicates a positive number; an MSB of 1 indicates a negative number. The remaining bits contain the magnitude of the number (but this magnitude can be interpreted different ways) 41
42 2.4 Signed Integer Representation There are 3 ways in which signed binary integers have been expressed in computers: Signed magnitude One s complement Two s complement 42
43 Pros and cons of SignMagnitude representation It is easy for people to understand, but it requires complicated computer hardware. It allows two different representations for zero: positive zero and negative zero. SKIP the rest of Section
44 Complement systems Idea: Negative values are represented by the difference between a high power of the base and the absolute value. The diminished radix complement of a nonzero number N in base r with d digits is (r d 1) N In the binary system, this gives us one s complement. It amounts to flipping the bits of a binary number. Example: in 8bit one s complement we have + 3 is: is:
45 One s Complement Example: in 8bit one s complement we have + 3 is: is: In one s complement, negative values are still indicated by a 1 in the MSB. Complement systems are useful because they eliminate the need for subtraction. The difference of two values is found by adding the minuend to the complement of the subtrahend. 45
46 Pros and cons of one s complement It is much simpler to implement than signed magnitude. It still has two different representations for zero: positive zero negative zero SKIP in section until Two s Complement 46
47 Two s complement Instead of the diminished radix complement (r d 1) N, we use the simple, (nondiminished) radix complement: r d N One s complement is still useful: flip the bits, then add one (to cancel the 1) 47
48 Two s complement To express a value in two s complement: If the number is positive, just convert it to binary and you re done. If the number is negative, find the one s complement of the number and then add 1. i.e. FLIP ALL THE BITS Example: In 8bit binary, 3 is: using one s complement representation is: Adding 1 gives us 3 in two s complement form:
49 Your turn: Write 21 and 21 in 8bit two s complement 49
50 Your turn: Convert these two s complement numbers to decimal:
51 QUIZ: What does the all ones combination mean in two s complement? (on any number of bits) 51
52 Two s complement arithmetic All we do is add our two binary numbers. Just discard any carries emitting from the high order bit. Example: Find the sum of 48 and 19 We note that 19 in binary is: , so 19 using one s complement is: , and 19 using two s complement is:
53 Example: Overflow in two s complement Find the sum of 107 and 46. We see that the nonzero carry from the seventh bit overflows into the sign bit, giving us the erroneous result: = But overflow into the sign bit does not always mean that we have an error! 53
54 Overflow in two s complement Example: Find the sum of 23 and 9. We see that there is carry into the sign bit, but the final result is correct: 23 + (9) = 14. This is because there is also carry out of the sign bit! Rule for detecting signed two s complement overflow: When the carry in and the carry out of the sign bit differ, overflow has occurred. If the carry into the sign bit equals the carry out of the sign bit, no overflow has occurred. 54
55 2.4.6 Carry vs. overflow For unsigned numbers overflow and carry are the same thing. For signed numbers carry is neither necessary nor sufficient for overflow. That is why most CPUs have two different flag bits: C V 55
56 2.4.3 ExcessM A.k.a. offset binary or biased representation We map the range of signed integers to unsigned by adding a bias M 56
57 2.4.4 Signed vs. unsigned integers Signed and unsigned numbers are both useful. For example, memory addresses are always unsigned. Using the same number of bits, unsigned integers can express twice as many positive values as signed numbers but they cannot represent negative numbers! 57
58 QUIZ: Signed vs. unsigned 8bit words can represent how many Unsigned numbers? Two s complement numbers? 58
59 2.4.5 Binary multiplication Research into finding better arithmetic algorithms has continued for over 50 years. One of the many interesting products of this work is Booth s algorithm. In most cases, Booth s algorithm carries out multiplication faster and more accurately than naïve pencilandpaper methods. The general idea is to replace arithmetic operations with bit shifting whenever possible. 59
60 Initialize product with all zeroes If the current multiplier bit is 1 and the preceding bit was 0, subtract the multiplicand from the product If the current multiplier bit is 0 and the preceding bit was 1, we add the multiplicand to the product If we have a 00 or 11 pair, do nothing. Shift (in all cases) Assume a mythical 0 bit in position 1 (to the right of MSB) Booth s algorithm 0011 x shift shift Multiplicand Multiplier subtract, then shift add, then shift 60 Check: 3 6 = 18
61 Booth s algorithm questions Q: How does the shifting work, exactly? A: The shift moves the multiplier to the left one position, setting it up for the next step. Q: How do we subtract? A: We use two s complement, and extend the sign bit. 61 Check: 3 6 = 18
62 Booth s algorithm Example 2.26 bonus: the multiplicand can be negative! 3 x x (subtract). Check: 623 x 5 = 15
63 Individual work for next time Read pp of text Follow and understand examples 2.19 through 2.24 Solve in notebook endofchapter Ex.36 and 43 (use Booth s alg. when possible!) 63
64 Sign extension! Booth s algorithm Example 2.27 Ignore all bits over 2n x Check: = 6678
65 QUIZ Booth s algorithm Multiply 5 x 7 (use 4 bits) 65
66 QUIZ Booth s algorithm Multiply 5 x 7 (use 4 bits) 66
67 Multiplication and division by 2 A left arithmetic shift inserts a 0 in for the rightmost bit and shifts everything else left one bit; in effect, it multiplies by 2 A right arithmetic shift shifts everything one bit to the right, but copies the sign bit; it divides by 2 Let s look at some examples. 67
68 Multiply 11 by 2 using 8bit signed two s complement representation. We start with the binary value for 11: (+11) We shift left one place, resulting in: (+22) The sign bit has not changed, so the value is valid. 68 To multiply 11 by 4, we simply perform a left shift twice.
69 Divide the value 12 by 2, using 8bit two s complement. We start with the binary value for 12: (+12) We shift left one place, resulting in: (+6) (Remember, we carry the sign bit to the left as we shift.) To divide 12 by 4, we right shift twice. 69
70 2.5 FloatingPoint Representation The representations covered so far are only for integer values and fractional values with fixed precision. These data types are not useful in scientific or business applications that deal with very large/small real numbers. Floatingpoint representation solves this problem. 70
71 2.5 FloatingPoint Representation Although FP representations can be implemented with software libraries, most of today s computers are equipped with specialized hardware that performs floatingpoint arithmetic with no special programming required. FPU, a.k.a. math coprocessor Intel 8086 and and 387 Since Intel 486DX, it is built into the CPU chip, i.e. integrated 71
72 2.5 FloatingPoint Representation Floatingpoint numbers allow an arbitrary number of decimal places to the right of the decimal point. For example: = They are often expressed in scientific notation. For example: = ,000,000 =
73 2.5 FloatingPoint Representation Computers use a form of scientific notation for floatingpoint representation Numbers written in scientific notation have three components: 73
74 2.5 FloatingPoint Representation Computer representation of a floatingpoint number consists of three fixedsize fields: This is the standard arrangement of these fields. Note: Although significand and mantissa do not technically mean the same thing, many people use these terms interchangeably. We use the term significand to refer to the fractional part of a floating point number. 74
75 2.5 FloatingPoint Representation The onebit sign field is the sign of the stored value. The size of the exponent field determines the range of values that can be represented. The size of the significand determines the precision of the representation. 75
76 2.5 FloatingPoint Representation We introduce a hypothetical Simple Model to explain the concepts In this model: A floatingpoint number is 14 bits in length The exponent field is 5 bits The significand field is 8 bits 76
77 2.5 FloatingPoint Representation The significand is always preceded by an implied binary point. Thus, the significand always contains a fractional binary value. The exponent indicates the power of 2 by which the significand is multiplied. 77
78 2.5 FloatingPoint Representation Example: Express in the simplified 14bit floatingpoint model. We know that 32 is 2 5. So in (binary) scientific notation 32 = 1.0 x 2 5 = 0.1 x 2 6. Why did we choose the second form? see next slide Using this information, we put 110 (= 6 10 ) in the exponent field and 1 in the significand as shown. 78
79 These are all equivalent representations for 32: 0.1 x x 2 7 Problem x x 2 9 Not only do these synonymous representations waste space, but they also require complex hardware to test for equality! 79
80 Solution We establish a rule that the first digit of the significand must be 1, with no ones to the left of the radix point. This process, called normalization, results in a unique pattern for each floatingpoint number. In our simple model, all significands must have the form 0.1xxxxxxxx For example, 4.5 = x 2 0 = x 2 2 = x 2 3. The last expression is correctly normalized. 80
81 QUIZ Represent in the 14bit floatingpoint model, normalized. 81
82 Normalization, results in a unique pattern for each floatingpoint number. In our simple model, all significands must have the form 0.1xxxxxxxx For example, 4.5 = x 2 0 = x 2 2 = x 2 3. The last expression is correctly normalized. If this bit is always one, why waste memory representing it?! 82
83 Normalization, results in a unique pattern for each floatingpoint number. In our simple model, all significands must have the form 0.1xxxxxxxx For example, 4.5 = x 2 0 = x 2 2 = x 2 3. The last expression is correctly normalized. If this bit is always one, why waste memory representing it?! Indeed, the IEEE754 standard uses an implied bit. 83
84 Individual work for next time Read pp of text Follow and understand examples 2.25 through 2.31 Solve in notebook Ex. 25 a, 26 /
85 2.5 FloatingPoint Representation Another problem We cannot represent negative exponents, b/c there is no sign in the exponent field. E.g. we have no way to express 0.5 =21 85
86 Solution We use a biased exponent. A bias is a number that is approximately midway in the range of values expressible by the exponent. We subtract the bias from the value in the exponent to determine its true value. In our case, we have a 5bit exponent. We take 2 5 / 21 = 15 for our bias. This is called excess15 representation. In our model, exponent values < 15 are negative, representing fractional numbers. 86
87 Example: Express in the revised 14bit floatingpoint model including the implied bit. 87
88 QUIZ: Express in the revised 14bit floatingpoint model. We know that is 24. So in (binary) scientific notation = 1.0 x 24 = 0.1 x 23 Add 15 to 3, giving =
89 QUIZ: Express in the revised 14bit floatingpoint model. 89
90 QUIZ: Express in the revised 14bit floatingpoint model. We find = Normalizing, we have: = x 2 5 Add 15 to 5, giving = We also need a 1 in the sign bit. 90
91 QUIZ: Given the 14bit floatingpoint model representation 36 C0, find the number that is represented 91
92 Overflow and underflow What is the largest number (in absolute value) that can be represented in our 14bit model? 92
93 Overflow and underflow What is the largest number (in absolute value) that can be represented in our 14bit model? ± = ± = 65, = x = ± 65, / sign expo significand 93
94 EXTRACREDIT QUIZ: 94
95 FloatingPoint Addition and Subtraction FP addition and subtraction are done w/methods analogous to those for pencil and paper: First express both operands in the same exponential power Add the numbers, preserving the exponent in the sum If the exponent requires adjustment, do so at the end 95
96 96
97 Your turn: Find the sum of and using the 14bit biased FP model. 97
98 FloatingPoint Errors Example: the 14bit model cannot exactly represent the decimal value 128.5, b/c it has 9 bits: = Even if the initial numbers are represented exactly, each arithmetic operation can introduce errors due to normalization Errors can be compounded through repetitive arithmetic operations 98
99 The programmer s job is to: FloatingPoint Errors Eliminate or reduce errors, by using appropriate numerical algorithms Example: Evaluate nchoose(n2) Evaluate the magnitude of the errors n n 2 Loss of MSB Example: = 128(!) e = Loss of LSB 0.39% Conclusion: Avoid numbers of very different magnitudes! 99
100 FloatingPoint Errors Compounded errors example: % A procedure repetitively adds 0.5 to 128: Correct values are: 128.5, 129, 129.5, 130 Actual values with the 14bit model are What is the absolute error after 10 iterations? What is the relative error after 10 iterations? 100
101 What can happen? FP overflow and underflow can cause programs to crash. Overflow occurs when there is no room to store the highorder bits resulting from a calculation. Underflow occurs when a value is too small to store, possibly resulting in division by zero. Loss of LSB is less dramatic, but due to compounding of errors is can be more dangerous! 101 It s better for a program to crash than to have it produce incorrect, but plausible, results.
102 Individual work for next time Read pp of text Read and understand the repeated multiplication example in Table 2.3/79 Read and take notes in notebook: Section IEEE754 Solve in notebook Ex. 27,
103 FP review QUIZ: Find the product of 7 10 and using the 14bit biased FP model. Use Booth s algorithm! Show all the steps! 103
104 2.5.4 IEEE754 The IEEE has established a standard for floatingpoint numbers: Single (32 bit), Double (64 bit) and Quad (128 bit) precisions What is different from the simplified 14bit model: The significant has an implied 1 to the LEFT of the binary point. Denormalized numbers can be represented Nonnumbers can be represented: ±, NaN (Not 104
105 IEEE 754 Single, double and quadruple precision 32, 64, 128 bits Sources:
106 Try it out with an online calculator! (Link is on our webpage) 106
107 SKIP the remainder of this section We only require working knowledge of the 14bit simplified model in this class 107
108 2.5.5 Range, precision, accuracy The range of a numeric integer format is the difference between the largest and smallest values that can be expressed Calculate the ranges for: 8bit unsigned integers 8bit signed integers (2 s complement) 14bit simple FP model 32bit double precision (IEEE 754) 108
109 Range, precision, accuracy
110 2.5.5 Range, precision, accuracy Accuracy means how closely a numeric representation approximates a true value. The precision of a number indicates how much information we have about a value. 110
111 Precision vs. accuracy Most of the time, greater precision leads to better accuracy For example when adding and multiplying numbers but this is not always true. For example, is a value of pi (= ) that is accurate to two digits, but has five digits of precision. 111
112 Because of truncated bits, we cannot always assume that a particular floating point operation is commutative or distributive. Example: we cannot assume: (a + b) + c = a + (b + c) a*(b + c) = ab + ac 112
113 To test a floating point value for equality to some other number, it is best to declare a nearness to x epsilon value. For example, instead of checking to see if floating point x is equal to 2 as follows: if x = 2 then it is better to use: epsilon if (abs(x  2) < epsilon) then... (assuming we have epsilon defined correctly!) 113
114 2.6 Character Codes As computers have evolved, character codes have evolved, b/c larger computer memories and storage devices make possible the use of richer character codes. Short history of codes: Baudot (5 bit) BCD (6bit) EBCDIC (8 bit) ASCII (7bit) Unicode (16bit) The earliest computer coding systems used 6 bits. Binarycoded decimal (BCD) was one of these early codes. It was used by IBM mainframes in the 1950s and 1960s. 114
115 2.6 Character Codes In 1964, BCD was extended to an 8bit code, Extended BinaryCoded Decimal Interchange Code (EBCDIC). EBCDIC was one of the first widelyused computer codes that supported upper and lowercase alphabetic characters, in addition to special characters, such as punctuation and control characters. EBCDIC and BCD are still in use in IBM mainframes today! 115
116 ASCII Other computer manufacturers chose the 7bit ASCII (American Standard Code for Information Interchange) as a replacement for 6bit codes. While BCD and EBCDIC were based upon punched card codes, ASCII was based upon telecommunications (Telex) codes. Until recently (~2008), ASCII was the dominant character code outside the IBM mainframe world. Later extended ASCII evolved so that all eight bits were used How many characters can be represented? 116
117 117 7bit ASCII Character Set
118 QUIZ Encode Hello, world! in ASCII Decode
119 The ASCII Character Set The first 32 characters in the ASCII character chart do not have a simple character representation to print to the screen. They are called control characters 119
120 Not in text Control Character: newline Source: 120
121 Not in text 8bit ( extended ) ASCII Character Sets By using 8 bits instead of 7, the number of codes extends from 128 to 256. Extended ASCII is always a superset of 7bit ASCII: The first 128 characters correspond exactly to 7bit ASCII Problem??? 121
122 Not in text Extended ASCII: IBM code page
123 Not in text Extended ASCII: Latin
124 Trick QUIZ What do these bits represent?
125 Trick QUIZ What do these bits represent? Unsigned integer: Signed integer (2 s complement): Fixedpoint fraction IBM 437 character: Latin1 character: 125
126 QUIZ: Your boss tells you to develop a webpage using the extended ASCII character set. What do you reply? 126
127 2.6 Character Codes Many of today s systems embrace Unicode, a 16bit system that can encode the characters of every language in the world. The Java programming language, and some operating systems now use Unicode as their default character code. The Unicode codespace is divided into six parts. The first part is for Western alphabet codes, including English, Greek, and Russian. 127
128 2.6 Character Codes The Unicode codespace allocation is shown at the right. The lowestnumbered Unicode characters comprise the ASCII code. The highest provide for userdefined codes. 128
129 The Unicode Character Set None of the Extended ASCII character sets were enough for international use (256!) Unicode uses 16 bits per character How many characters can UNICODE represent? Unicode is a superset of Latin1: The first 256 characters correspond exactly to Latin1 characters ( ) 129 Simplified Chinese has 6500!
130 130 Figure 3.6 A few characters in the Unicode character set Unicode examples
131 Miscellaneous Characters in Unicode 131 See more online at the official Unicode site
132 Romanian Characters in Unicode Part of the LatinExtendedB character subset 132
133 Miscellaneous Characters in Unicode 133 See more online at the official Unicode site
134 QUIZ Select all that apply: The Latin1 character set: Is a 5bit representation Is a 7bit representation Is a 16bit representation Is an extension of ASCII Is an extension of Unicode Contains letters used in European languages 134
135 QUIZ Select all that apply: The Unicode representation: Uses 16 bits Is an extension of ASCII Is an extension of Latin1 Is an extension of IBM437 Contains letters used in all world languages Can accommodate over 65,000 characters Is used in the majority of web pages today 135 EOL4
136 2.7 Error Detection and Correction SKIP! (We cover this in Networks) 136
137 Homework for Ch.2 Due Tue, Sep.23 Endofchapter exercises: 2, 4, 8, only two s comp only two s comp. 31, use Booth s algorithm 45, 58,
IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1
IT 1204 Section 2.0 Data Representation and Arithmetic 2009, University of Colombo School of Computing 1 What is Analog and Digital The interpretation of an analog signal would correspond to a signal whose
More informationModule 2: Computer Arithmetic
Module 2: Computer Arithmetic 1 B O O K : C O M P U T E R O R G A N I Z A T I O N A N D D E S I G N, 3 E D, D A V I D L. P A T T E R S O N A N D J O H N L. H A N N E S S Y, M O R G A N K A U F M A N N
More informationCHAPTER 2 Data Representation in Computer Systems
CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting
More informationCHAPTER 2 Data Representation in Computer Systems
CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting
More informationCourse Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation
Course Schedule CS 221 Computer Architecture Week 3: Information Representation (2) Fall 2001 W1 Sep 11 Sep 14 Introduction W2 Sep 18 Sep 21 Information Representation (1) (Chapter 3) W3 Sep 25 Sep
More informationInf2C  Computer Systems Lecture 2 Data Representation
Inf2C  Computer Systems Lecture 2 Data Representation Boris Grot School of Informatics University of Edinburgh Last lecture Moore s law Types of computer systems Computer components Computer system stack
More information10.1. Unit 10. Signed Representation Systems Binary Arithmetic
0. Unit 0 Signed Representation Systems Binary Arithmetic 0.2 BINARY REPRESENTATION SYSTEMS REVIEW 0.3 Interpreting Binary Strings Given a string of s and 0 s, you need to know the representation system
More informationBinary Addition & Subtraction. Unsigned and Sign & Magnitude numbers
Binary Addition & Subtraction Unsigned and Sign & Magnitude numbers Addition and subtraction of unsigned or sign & magnitude binary numbers by hand proceeds exactly as with decimal numbers. (In fact this
More informationCS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.
CS 265 Computer Architecture Wei Lu, Ph.D., P.Eng. 1 Part 1: Data Representation Our goal: revisit and reestablish fundamental of mathematics for the computer architecture course Overview: what are bits
More informationUNIT  I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS
UNIT  I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS (09 periods) Computer Arithmetic: Data Representation, Fixed Point Representation, Floating Point Representation, Addition and
More informationFloatingpoint Arithmetic. where you sum up the integer to the left of the decimal point and the fraction to the right.
Floatingpoint Arithmetic Reading: pp. 312328 FloatingPoint Representation Nonscientific floating point numbers: A noninteger can be represented as: 2 4 2 3 2 2 2 1 2 0.21 22 23 24 where you sum
More informationSigned umbers. Sign/Magnitude otation
Signed umbers So far we have discussed unsigned number representations. In particular, we have looked at the binary number system and shorthand methods in representing binary codes. With m binary digits,
More informationChapter 2: Number Systems
Chapter 2: Number Systems Logic circuits are used to generate and transmit 1s and 0s to compute and convey information. This twovalued number system is called binary. As presented earlier, there are many
More informationNumber Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example
Appendix F Number Systems Binary Numbers Decimal notation represents numbers as powers of 10, for example 1729 1 103 7 102 2 101 9 100 decimal = + + + There is no particular reason for the choice of 10,
More information1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM
1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1.1 Introduction Given that digital logic and memory devices are based on two electrical states (on and off), it is natural to use a number
More informationECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationNumber Systems and Computer Arithmetic
Number Systems and Computer Arithmetic Counting to four billion two fingers at a time What do all those bits mean now? bits (011011011100010...01) instruction Rformat Iformat... integer data number text
More informationDRAM uses a single capacitor to store and a transistor to select. SRAM typically uses 6 transistors.
Data Representation Data Representation Goal: Store numbers, characters, sets, database records in the computer. What we got: Circuit that stores 2 voltages, one for logic 0 (0 volts) and one for logic
More informationFloating point. Today! IEEE Floating Point Standard! Rounding! Floating Point Operations! Mathematical properties. Next time. !
Floating point Today! IEEE Floating Point Standard! Rounding! Floating Point Operations! Mathematical properties Next time! The machine model Chris Riesbeck, Fall 2011 Checkpoint IEEE Floating point Floating
More informationSystem Programming CISC 360. Floating Point September 16, 2008
System Programming CISC 360 Floating Point September 16, 2008 Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties Powerpoint Lecture Notes for Computer Systems:
More informationComputer Arithmetic Ch 8
Computer Arithmetic Ch 8 ALU Integer Representation Integer Arithmetic FloatingPoint Representation FloatingPoint Arithmetic 1 Arithmetic Logical Unit (ALU) (2) Does all work in CPU (aritmeettislooginen
More informationLogic, Words, and Integers
Computer Science 52 Logic, Words, and Integers 1 Words and Data The basic unit of information in a computer is the bit; it is simply a quantity that takes one of two values, 0 or 1. A sequence of k bits
More informationPrinciples of Computer Architecture. Chapter 3: Arithmetic
31 Chapter 3  Arithmetic Principles of Computer Architecture Miles Murdocca and Vincent Heuring Chapter 3: Arithmetic 32 Chapter 3  Arithmetic 3.1 Overview Chapter Contents 3.2 Fixed Point Addition
More informationFloating point. Today. IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties Next time.
Floating point Today IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties Next time The machine model Fabián E. Bustamante, Spring 2010 IEEE Floating point Floating point
More informationData Representation. DRAM uses a single capacitor to store and a transistor to select. SRAM typically uses 6 transistors.
Data Representation Data Representation Goal: Store numbers, characters, sets, database records in the computer. What we got: Circuit that stores 2 voltages, one for logic ( volts) and one for logic (3.3
More informationChapter 3 Arithmetic for Computers (Part 2)
Department of Electr rical Eng ineering, Chapter 3 Arithmetic for Computers (Part 2) 王振傑 (ChenChieh Wang) ccwang@mail.ee.ncku.edu.tw ncku edu Depar rtment of Electr rical Eng ineering, FengChia Unive
More informationSystems I. Floating Point. Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties
Systems I Floating Point Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties IEEE Floating Point IEEE Standard 754 Established in 1985 as uniform standard for
More information4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning
4 Operations On Data 4.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List the three categories of operations performed on data.
More informationFloating Point Arithmetic
Floating Point Arithmetic CS 365 FloatingPoint What can be represented in N bits? Unsigned 0 to 2 N 2s Complement 2 N1 to 2 N11 But, what about? very large numbers? 9,349,398,989,787,762,244,859,087,678
More informationCMSC 313 Lecture 03 Multiplebyte data bigendian vs littleendian sign extension Multiplication and division Floating point formats Character Codes
Multiplebyte data CMSC 313 Lecture 03 bigendian vs littleendian sign extension Multiplication and division Floating point formats Character Codes UMBC, CMSC313, Richard Chang 45 Chapter
More informationDigital Fundamentals
Digital Fundamentals Tenth Edition Floyd Chapter 1 Modified by Yuttapong Jiraraksopakun Floyd, Digital Fundamentals, 10 th 2008 Pearson Education ENE, KMUTT ed 2009 Analog Quantities Most natural quantities
More informationIEEE754 floatingpoint
IEEE754 floatingpoint Real and floatingpoint numbers Real numbers R form a continuum  Rational numbers are a subset of the reals  Some numbers are irrational, e.g. π Floatingpoint numbers are an
More informationChapter 2 Bits, Data Types, and Operations
Chapter 2 Bits, Data Types, and Operations How do we represent data in a computer? At the lowest level, a computer is an electronic machine. works by controlling the flow of electrons Easy to recognize
More informationAdministrivia. CMSC 216 Introduction to Computer Systems Lecture 24 Data Representation and Libraries. Representing characters DATA REPRESENTATION
Administrivia CMSC 216 Introduction to Computer Systems Lecture 24 Data Representation and Libraries Jan Plane & Alan Sussman {jplane, als}@cs.umd.edu Project 6 due next Friday, 12/10 public tests posted
More informationCharacters, Strings, and Floats
Characters, Strings, and Floats CS 350: Computer Organization & Assembler Language Programming 9/6: pp.8,9; 9/28: Activity Q.6 A. Why? We need to represent textual characters in addition to numbers. Floatingpoint
More information4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning
4 Operations On Data 4.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List the three categories of operations performed on data.
More informationCS429: Computer Organization and Architecture
CS429: Computer Organization and Architecture Dr. Bill Young Department of Computer Sciences University of Texas at Austin Last updated: September 18, 2017 at 12:48 CS429 Slideset 4: 1 Topics of this Slideset
More informationChapter 3: part 3 Binary Subtraction
Chapter 3: part 3 Binary Subtraction Iterative combinational circuits Binary adders Half and full adders Ripple carry and carry lookahead adders Binary subtraction Binary addersubtractors Signed binary
More informationFloating Point Numbers
Floating Point Numbers Summer 8 Fractional numbers Fractional numbers fixed point Floating point numbers the IEEE 7 floating point standard Floating point operations Rounding modes CMPE Summer 8 Slides
More informationFloating Point Puzzles The course that gives CMU its Zip! Floating Point Jan 22, IEEE Floating Point. Fractional Binary Numbers.
class04.ppt 15213 The course that gives CMU its Zip! Topics Floating Point Jan 22, 2004 IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties Floating Point Puzzles For
More information3.5 Floating Point: Overview
3.5 Floating Point: Overview Floating point (FP) numbers Scientific notation Decimal scientific notation Binary scientific notation IEEE 754 FP Standard Floating point representation inside a computer
More informationFloating Point Numbers. Lecture 9 CAP
Floating Point Numbers Lecture 9 CAP 3103 06162014 Review of Numbers Computers are made to deal with numbers What can we represent in N bits? 2 N things, and no more! They could be Unsigned integers:
More informationNumber Systems & Encoding
Number Systems & Encoding Lecturer: Sri Parameswaran Author: Hui Annie Guo Modified: Sri Parameswaran Week2 1 Lecture overview Basics of computing with digital systems Binary numbers Floating point numbers
More informationC NUMERIC FORMATS. Overview. IEEE SinglePrecision Floatingpoint Data Format. Figure C0. Table C0. Listing C0.
C NUMERIC FORMATS Figure C. Table C. Listing C. Overview The DSP supports the 32bit singleprecision floatingpoint data format defined in the IEEE Standard 754/854. In addition, the DSP supports an
More informationFloating Point. The World is Not Just Integers. Programming languages support numbers with fraction
1 Floating Point The World is Not Just Integers Programming languages support numbers with fraction Called floatingpoint numbers Examples: 3.14159265 (π) 2.71828 (e) 0.000000001 or 1.0 10 9 (seconds in
More informationChapter 2 Float Point Arithmetic. Real Numbers in Decimal Notation. Real Numbers in Decimal Notation
Chapter 2 Float Point Arithmetic Topics IEEE Floating Point Standard Fractional Binary Numbers Rounding Floating Point Operations Mathematical properties Real Numbers in Decimal Notation Representation
More informationLearning the Binary System
Learning the Binary System www.brainlubeonline.com/counting_on_binary/ Formated to L A TEX: /25/22 Abstract This is a document on the base2 abstract numerical system, or Binary system. This is a VERY
More informationFloatingPoint Numbers in Digital Computers
POLYTECHNIC UNIVERSITY Department of Computer and Information Science FloatingPoint Numbers in Digital Computers K. Ming Leung Abstract: We explain how floatingpoint numbers are represented and stored
More information1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
CS 64 Lecture 2 Data Representation Reading: FLD 1.21.4 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 ) + (1x10 0 ) 1010 10?= 1010 2?= 1
More informationLecture (03) Binary Codes Registers and Logic Gates
Lecture (03) Binary Codes Registers and Logic Gates By: Dr. Ahmed ElShafee Binary Codes Digital systems use signals that have two distinct values and circuit elements that have two stable states. binary
More informationl l l l l l l Base 2; each digit is 0 or 1 l Each bit in place i has value 2 i l Binary representation is used in computers
198:211 Computer Architecture Topics: Lecture 8 (W5) Fall 2012 Data representation 2.1 and 2.2 of the book Floating point 2.4 of the book Computer Architecture What do computers do? Manipulate stored information
More informationDigital Logic Lecture 2 Number Systems
Digital Logic Lecture 2 Number Systems By Ghada AlMashaqbeh The Hashemite University Computer Engineering Department Outline Introduction. Basic definitions. Number systems types. Conversion between different
More informationThe Sign consists of a single bit. If this bit is '1', then the number is negative. If this bit is '0', then the number is positive.
IEEE 754 Standard  Overview Frozen Content Modified by on 13Sep2017 Before discussing the actual WB_FPU  Wishbone Floating Point Unit peripheral in detail, it is worth spending some time to look at
More informationA complement number system is used to represent positive and negative integers. A complement number system is based on a fixed length representation
Complement Number Systems A complement number system is used to represent positive and negative integers A complement number system is based on a fixed length representation of numbers Pretend that integers
More informationComputer Architecture and Organization
31 Chapter 3  Arithmetic Computer Architecture and Organization Miles Murdocca and Vincent Heuring Chapter 3 Arithmetic 32 Chapter 3  Arithmetic Chapter Contents 3.1 Fixed Point Addition and Subtraction
More informationFloating Point Considerations
Chapter 6 Floating Point Considerations In the early days of computing, floating point arithmetic capability was found only in mainframes and supercomputers. Although many microprocessors designed in the
More informationNumeric Variable Storage Pattern
Numeric Variable Storage Pattern Sreekanth Middela Srinivas Vanam Rahul Baddula Percept Pharma Services, Bridgewater, NJ ABSTRACT This paper presents the Storage pattern of Numeric Variables within the
More informationCS101 Lecture 04: Binary Arithmetic
CS101 Lecture 04: Binary Arithmetic Binary Number Addition Two s complement encoding Briefly: real number representation Aaron Stevens (azs@bu.edu) 25 January 2013 What You ll Learn Today Counting in binary
More informationNUMBER SYSTEMS AND CODES
C H A P T E R 69 Learning Objectives Number Systems The Decimal Number System Binary Number System Binary to Decimal Conversion Binary Fractions DoubleDadd Method Decimal to Binary Conversion Shifting
More information4/8/17. Admin. Assignment 5 BINARY. David Kauchak CS 52 Spring 2017
4/8/17 Admin! Assignment 5 BINARY David Kauchak CS 52 Spring 2017 Diving into your computer Normal computer user 1 After intro CS After 5 weeks of cs52 What now One last note on CS52 memory address binary
More informationIBM 370 Basic Data Types
IBM 370 Basic Data Types This lecture discusses the basic data types used on the IBM 370, 1. Two s complement binary numbers 2. EBCDIC (Extended Binary Coded Decimal Interchange Code) 3. Zoned Decimal
More informationLecture 5. Computer Arithmetic. Ch 9 [Stal10] Integer arithmetic Floatingpoint arithmetic
Lecture 5 Computer Arithmetic Ch 9 [Stal10] Integer arithmetic Floatingpoint arithmetic ALU ALU = Arithmetic Logic Unit (aritmeettislooginen yksikkö) Actually performs operations on data Integer and
More information9/23/15. Agenda. Goals of this Lecture. For Your Amusement. Number Systems and Number Representation. The Binary Number System
For Your Amusement Number Systems and Number Representation Jennifer Rexford Question: Why do computer programmers confuse Christmas and Halloween? Answer: Because 25 Dec = 31 Oct  http://www.electronicsweekly.com
More informationWe can study computer architectures by starting with the basic building blocks. Adders, decoders, multiplexors, flipflops, registers,...
COMPUTER ARCHITECTURE II: MICROPROCESSOR PROGRAMMING We can study computer architectures by starting with the basic building blocks Transistors and logic gates To build more complex circuits Adders, decoders,
More informationFloating Point Arithmetic
Floating Point Arithmetic Floating point numbers are frequently used in many applications. Implementation of arithmetic units such as adder, multiplier, etc for Floating point numbers are more complex
More informationECE 372 Microcontroller Design Assembly Programming Arrays. ECE 372 Microcontroller Design Assembly Programming Arrays
Assembly Programming Arrays Assembly Programming Arrays Array For Loop Example: unsigned short a[]; for(j=; j
More information17. Instruction Sets: Characteristics and Functions
17. Instruction Sets: Characteristics and Functions Chapter 12 Spring 2016 CS430  Computer Architecture 1 Introduction Section 12.1, 12.2, and 12.3 pp. 406418 Computer Designer: Machine instruction set
More informationENE 334 Microprocessors
Page 1 ENE 334 Microprocessors Lecture 10: MCS51: Logical and Arithmetic : Dejwoot KHAWPARISUTH http://webstaff.kmutt.ac.th/~dejwoot.kha/ ENE 334 MCS51 Logical & Arithmetic Page 2 Logical: Objectives
More informationArithmetic Logic Unit
Arithmetic Logic Unit A.R. Hurson Department of Computer Science Missouri University of Science & Technology A.R. Hurson 1 Arithmetic Logic Unit It is a functional bo designed to perform "basic" arithmetic,
More information15213 Recitation 2: Floating Point
15213 Recitation 2: Floating Point 1 Introduction This handout will introduce and test your knowledge of the floating point representation of real numbers, as defined by the IEEE standard. This information
More informationDeclaring Floating Point Data
Declaring Floating Point Data There are three ways to declare floating point storage. These are E D L Single precision floating point, Double precision floating point, and Extended precision floating point.
More informationEE 109 Unit 6 Binary Arithmetic
EE 109 Unit 6 Binary Arithmetic 1 2 Semester Transition Point At this point we are going to start to transition in our class to look more at the hardware organization and the lowlevel software that is
More informationClasses of Real Numbers 1/2. The Real Line
Classes of Real Numbers All real numbers can be represented by a line: 1/2 π 1 0 1 2 3 4 real numbers The Real Line { integers rational numbers nonintegral fractions irrational numbers Rational numbers
More information1. Draw general diagram of computer showing different logical components (3)
Tutorial 1 1. Draw general diagram of computer showing different logical components (3) 2. List at least three input devices (1.5) 3. List any three output devices (1.5) 4. Fill the blank cells of the
More informationScientific Computing. Error Analysis
ECE257 Numerical Methods and Scientific Computing Error Analysis Today s s class: Introduction to error analysis Approximations RoundOff Errors Introduction Error is the difference between the exact solution
More informationFive classic components
CS/COE0447: Computer Organization and Assembly Language Chapter 3 modified by Bruce Childers original slides by Sangyeun Cho Dept. of Computer Science Five classic components I am like a control tower
More informationData Representation Floating Point
Data Representation Floating Point CSCI 2400 / ECE 3217: Computer Architecture Instructor: David Ferry Slides adapted from Bryant & O Hallaron s slides via Jason Fritts Today: Floating Point Background:
More informationIEEE Standard 754 Floating Point Numbers
IEEE Standard 754 Floating Point Numbers Steve Hollasch / Last update 2005Feb24 IEEE Standard 754 floating point is the most common representation today for real numbers on computers, including Intelbased
More informationUnit 3. Analog vs. Digital. Analog vs. Digital ANALOG VS. DIGITAL. Binary Representation
3.1 3.2 Unit 3 Binary Representation ANALOG VS. DIGITAL 3.3 3.4 Analog vs. Digital The analog world is based on continuous events. Observations can take on (real) any value. The digital world is based
More informationSigned Binary Numbers
Signed Binary Numbers Unsigned Binary Numbers We write numbers with as many digits as we need: 0, 99, 65536, 15000, 1979, However, memory locations and CPU registers always hold a constant, fixed number
More informationData Types. Data Types. Integer Types. Signed Integers
Data Types Data Types Dr. TGI Fernando 1 2 The fundamental building blocks of any programming language. What is a data type? A data type is a set of values and a set of operations define on these values.
More informationDigital Computers and Machine Representation of Data
Digital Computers and Machine Representation of Data K. Cooper 1 1 Department of Mathematics Washington State University 2013 Computers Machine computation requires a few ingredients: 1 A means of representing
More informationumber Systems bit nibble byte word binary decimal
umber Systems 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. To perform useful operations on these
More informationCS/COE 0447 Example Problems for Exam 2 Spring 2011
CS/COE 0447 Example Problems for Exam 2 Spring 2011 1) Show the steps to multiply the 4bit numbers 3 and 5 with the fast shiftadd multipler. Use the table below. List the multiplicand (M) and product
More informationObjects and Types. COMS W1007 Introduction to Computer Science. Christopher Conway 29 May 2003
Objects and Types COMS W1007 Introduction to Computer Science Christopher Conway 29 May 2003 Java Programs A Java program contains at least one class definition. public class Hello { public static void
More informationComputer Logical Organization Tutorial
Computer Logical Organization Tutorial COMPUTER LOGICAL ORGANIZATION TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Computer Logical Organization Tutorial Computer
More informationCOMP 303 Computer Architecture Lecture 6
COMP 303 Computer Architecture Lecture 6 MULTIPLY (unsigned) Paper and pencil example (unsigned): Multiplicand 1000 = 8 Multiplier x 1001 = 9 1000 0000 0000 1000 Product 01001000 = 72 n bits x n bits =
More informationFloating Point. What can be represented in N bits? 0 to 2N1. 9,349,398,989,787,762,244,859,087, x 1067
MIPS Floating Point Operations Cptr280 Dr Curtis Nelson Floating Point What can be represented in N bits? Unsigned 2 s Complement 0 to 2N12N1 to 2N11 But, what about Very large numbers? 9,349,398,989,787,762,244,859,087,678
More informationP( Hit 2nd ) = P( Hit 2nd Miss 1st )P( Miss 1st ) = (1/15)(15/16) = 1/16. P( Hit 3rd ) = (1/14) * P( Miss 2nd and 1st ) = (1/14)(14/15)(15/16) = 1/16
CODING and INFORMATION We need encodings for data. How many questions must be asked to be certain where the ball is. (cases: avg, worst, best) P( Hit 1st ) = 1/16 P( Hit 2nd ) = P( Hit 2nd Miss 1st )P(
More informationCS367 Test 1 Review Guide
CS367 Test 1 Review Guide This guide tries to revisit what topics we've covered, and also to briefly suggest/hint at types of questions that might show up on the test. Anything on slides, assigned reading,
More informationMath 230 Assembly Programming (AKA Computer Organization) Spring 2008
Math 230 Assembly Programming (AKA Computer Organization) Spring 2008 MIPS Intro II Lect 10 Feb 15, 2008 Adapted from slides developed for: Mary J. Irwin PSU CSE331 Dave Patterson s UCB CS152 M230 L10.1
More informationDATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes. Error Detection Codes
1 DATA REPRESENTATION Data Types Complements Fixed Point Representations Floating Point Representations Other Binary Codes Error Detection Codes 2 Data Types DATA REPRESENTATION Information that a Computer
More informationECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #3: Of Integers and Endians (pt. 2)
ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #3: Of Integers and Endians (pt. 2) Reading for Today: Davies Ch 2, MSP430 User's Guide Ch 6.1, 6.3 Reading for Next Class:
More informationCHAPTER 6 ARITHMETIC, LOGIC INSTRUCTIONS, AND PROGRAMS
CHAPTER 6 ARITHMETIC, LOGIC INSTRUCTIONS, AND PROGRAMS Addition of Unsigned Numbers The instruction ADD is used to add two operands Destination operand is always in register A Source operand can be a register,
More informationARCHITECTURAL DESIGN OF 8 BIT FLOATING POINT MULTIPLICATION UNIT
ARCHITECTURAL DESIGN OF 8 BIT FLOATING POINT MULTIPLICATION UNIT Usha S. 1 and Vijaya Kumar V. 2 1 VLSI Design, Sathyabama University, Chennai, India 2 Department of Electronics and Communication Engineering,
More informationOctal & Hexadecimal Number Systems. Digital Electronics
Octal & Hexadecimal Number Systems Digital Electronics What, More Number Systems? Why do we need more number systems? Humans understand decimal Check out my ten digits! Digital electronics (computers)
More informationTailoring the 32Bit ALU to MIPS
Tailoring the 32Bit ALU to MIPS MIPS ALU extensions Overflow detection: Carry into MSB XOR Carry out of MSB Branch instructions Shift instructions Slt instruction Immediate instructions ALU performance
More informationNumber System (Different Ways To Say How Many) Fall 2016
Number System (Different Ways To Say How Many) Fall 2016 Introduction to Information and Communication Technologies CSD 102 Email: mehwish.fatima@ciitlahore.edu.pk Website: https://sites.google.com/a/ciitlahore.edu.pk/ict/
More informationCoprocessor Math Processor. Richa Upadhyay Prabhu. NMIMS s MPSTME February 9, 2016
8087 Math Processor Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu February 9, 2016 Introduction Need of Math Processor: In application where fast calculation is required Also where there
More informationMore Programming Constructs  Introduction
More Programming Constructs  Introduction We can now examine some additional programming concepts and constructs Chapter 5 focuses on: internal data representation conversions between one data type and
More information