( 214 (represen ed by flipping) (magnitude = -42) = = -42 (flip the bits and add 1)

Size: px
Start display at page:

Download "1 1 0 1 0 1 0 1 ( 214 (represen ed by flipping) - 256 (magnitude = -42) 1 1 0 1 0 1 1 0 = -128 + 64 + 16 + 4 + 1 = -42 (flip the bits and add 1)"

Transcription

1 1. Express 42 (decimal) in 8-bit binary = = 42 NOTE: This document is not officially endorsed by the Department of Informatics, or the lecturers responsible for CS1. It is simply a record of how I would approach the CS1 exam, were I sitting it. Thus, I cannot guaran ee that every single element is correct: as with anything you read on the In ernet you should double-check it s not absolu e shit :-) 2. Express -42 (decimal) in 8-bit sign and magnitude Sign Express -42 (decimal) in 8-bit one s-complement form ( 214 (represen ed by flipping) (magnitude = -42) 4. Express -42 (decimal) in 8-bit two s-complement form = = -42 (flip the bits and add 1) 5. Express (binary) in hexadecimal digits F (split in o groups of 4, with 10 = A, 11 = B e c.) 6. Express (binary) in oc al digits (0) (adding an extra leading 0 o make groups of 3) 2 5 2

2 7. Convert the 8-bit sign-and-magnitude form o decimal Sign = = 42 + sign bit = Convert the 8-bit one s complement form o decimal (flip the bits) = = 85 (as was in one s complement) = Convert the 8-bit two s complement form o decimal = = Convert the fixed-point binary form o decimal Positive Negative spectrum (2^-n or halving) = /2 + 1/8 = Evalua e the binary sum (carry the additional 1s over) (No e that addition here is strictly in binary, so there is not 2 but 1 0, which must be carried). 12. Evalua e in 8-bit two s complement for (decimal) S ep 1. Flip the bits of the second number and add one o it, in order o reverse its sign = =

3 S ep 2. Add the two numbers ogether (64) (-31) (1) = = Multiply (binary) by 11 (binary) x 1 1 (multiply by each bit) (0) (add a 0 for each bit multiplied, ignoring the overflow) (then add) 14. Divide the unsigned in eger by 1 1 S ep 1. Line up the long division S ep 2. Ask if the dividend on the left fits in o each bit in turn (left o right) of the divisor, when it does wri e a one at the op and rewri e the number below it S ep 3. Now subtract the newly formed row (braces from square brackets) [1 1] {1 1} 0 0 S ep 4. Res art the process o see if the dividend will fit in o the result of the subtraction. If not, bring down information from above.

4 1 1 1 [1 1] {1 1} S ep 5. In this ins ance, 11 does not fit, so we wri e a zero at the op and continue the process of brining down numbers from above until it does [1 1] {1 1} S ep 6. The process can now be repea ed and once your calculation is comple e, the answer is across the op: [1 1] {1 1} 0 0 [1 1] {1 1} 0 0 [1 1] {1 1} NB: To check your answers, you can convert the numbers o decimal, perform the division, re-convert, and see if the answers ma ch. 15. Display the binary represen ation of (decimal) according o the IEEE-754 single precision s andard. S ep 1. Convert o binary = S ep 2. Normalise so there is a single leading 1. (NB. You can move the decimal point both left and right o achieve this) x 2^2 S ep 3. Add the bias (this is done o allow for the represen ation of negative numbers)

5 Biased exponent = 129 ( ) = S ep 3. Slot this information in o the IEEE754 single-precision format sign (1-bit) exponent (8-bit) mantissa (23-bit) 0 (because the number is positive (this information is additional)) sign (1-bit) exponent (8-bit) mantissa (23-bit) (copied directly) sign (1-bit) exponent (8-bit) mantissa (23-bit) (copied without the leading 1 which is implicit and padded with 0s) Final answer: How many by es (words) of RAM can be addressed using 16 bits No e the rule that with n bits, we can address 2^n locations. So we can address 2^16 = locations. 17. How many by es are needed o address 4GB of RAM? There are approxima ely 1 billion by es in a gigaby e. So 4 billion in 4 gigaby es. 2^32 is roughly 4 billion, so we will need 32 bits o address these by es. Thus, 32 / 8 = 4 by es o address these by es. 18. If a PC with a 4GHz clock can process an average of one machine instruction every 100 clock cycles, what is its average processing ra e in MIPS (millions of instructions per second)? 1Hz is 1 cycle of compu ation per second. If we can process 1 instruction every cycle, then in 1Hz we can do one instruction. If we imagine that in 1Hz we can do 1 instruction then in a mhz (1 million Hz) we can do 1,000,000 instructions (cycles). Similarly, in a ghz we (1 billion Hz) we can do 1 billion instructions; in 4ghZ we can do 4 billion instructions (cycles), per second.

6 By this reasoning, if it does not ake 1 cycle o comple e an instruction, but ins ead 100, then our millions of instructions per second is: 4,000,000,000 / 100 = 40 million (instructions per second) 19. Find the maximum relative error of IEEE-754 single precision represen ation. NB: Answers in square brackets are consis ent with January 2012, answers WITHOUT are consis ent with January 2010/2011. This requires clarification. Because we have a limi ed number of bits o represent numbers in the IEEE format, sometimes the results of operations are of a larger precision than the space we have o represent them. For example, the largest decimal precision we can represent in our mantissa in single precision IEEE-754 is 2-23 (23 bits) [plus the normalised bit, ] We therefore want o know what is the most information we can lose if a result of an operation is larger than 2-23 [2-24 ] i.e. if the result produces a number of size 23 [24] bits+. The answer, is simply 2-24 [2-25 ] because this captures the largest number by which the result could differ from what we want. Because [2-25 ] 2-26, 2-27 e c. onwards owards infinity will always be smaller, this is accura e. 20. Find the maximum value in the IEEE-754 single precision represen ation. Recall the division of single prevision as the following: sign (1-bit) exponent (8-bit) mantissa (23-bit) Because we have o add a bias, the maximum exponent we can represent before adding said bias is 255 (because we only have 8-bits, the maximum number that can be represen ed in this space is (2^n) - 1) = 128. The maximum mantissa we can represent is 2 - (2^-23) - why? Because we have 1 from our implicit normalised bit, added o a summation of the floating point numbers. So, for example:

7 = 1. [ e c e c ] which roughly equals which is roughly equal o 2. Our maximum mantissa is therefore 2.0 * 2^128 so 2^ What happens if the absolu e value of a single-precision number is grea er than this value? The number cannot be adequa ely represen ed in the space available so a floating point overflow exception occurs. Overflow can be indica ed when the sign of the result is incorrect. 22. Find the minimum positive value in the IEEE-754 single precision represen ation In a similar manner o the maximum represen ation, the minimum positive represen ation is the smallest positive floating point number which can be represen ed. Again, due o the bias, the smallest negative exponent we can represent is -127, because adding this exponent on will produce 0, which is the least we can represent in the exponent bits of the IEEE format. (000 (represen ed) ( aking off the bias) = - 127). Similarly, the minimum positive mantissa we can represent is 1.0, because we *have* o have the normalised 1, but can add o this nothing, by setting the entirety of the mantissa o What happens if the absolu e value of a single-precision number is smaller than this value? If the result of an arithmetic operation on a floating point number is less than the value we can represent (in this case it goes on o the negative spectrum), we underflow o 0, which means that we simply record the result as a negative number. This is ok, because it still sufficiently approxima es the result. 24. List the s eps that occur in the addition of two floating-point numbers x 2^ x 2^1

8 S ep 1. Shift the exponents so they are equal (we usually shift the smallest one up o the biggest) x 2^ x 2^4 S ep 2. Add (or subtract) the mantissa as normal x 2^4 S ep 3. Renormalise (if necessary) adjusting the exponent x 2^5 25. List the s eps that occur in the multiplication of two floating-point numbers (2.4 x 10^5) x (3.0 x 10^3) S ep 1. Subtract a bias from the exponent (if one exists) and then add the exponents ogether S ep 2. Multiply the mantissas ogether 7.2 x 10^8 S ep 3. Normalise the product if necessary, adjusting the exponent 26. Distinguish between carry and overflow Carry usually occurs in the addition of binary numbers and is the ins ance in which the sum of two numbers exceeds the available number of bits in the represen ation. In this case, the extra bits are passed up o the next higher magnitude position. If there is no higher magnitude position (i.e. nothing af er the MSB), then overflow occurs. 27. Distinguish between borrow and underflow Borrowing usually occurs in a binary subtraction and is the process by which a lower order bit must request a bit from a higher order one in order o comple e the compu ation. In the following example, the second 0 in the op row must borrow from the MSB in order o comple e the subtraction.

9 In this ins ance however, the MSB would then become 0, and the resulting subtraction would require 0-1. With nothing af er the MSB, no borrowing can ake place and we now have underflow. 28. Name four disk-scheduling algorithms and s a e which of these is likely o exhibit the best performance under high disk utilisation. When information is read from disk, the largest time over-head is the movement of the desired disk sec or under the read/wri e head. In erms of optimisation therefore, we seek o reduce this time in anyway way we can. One echnique o do this is o schedule the requests of processes o disk in an order which reduces disk movement. Under First come first serve, the requests by processes are at ended o in order. This is clearly the most ineffecient performance. The next most efficient echnique is shor est seek time first which orders requests so that the disk arm always moves o the request next in the queue closest o its current location. This, however, could result in disk tracks which are furthest away never being serviced. A more complex scheduling echnique is known as the eleva or algorithm or SCAN, which sweeps up and down the surface of the disk picking up areas o be read as it moves, similar o how a lift moves in a ower block. A variant of SCAN, C-SCAN, only reads in one direction, so, using the lift analogy, if it is moving upwards across the disk and there is information o be read below, it must first come back o the bot om and then move upwards again o read information. LOOK and C-LOOK al er this process by not going all the way up and down the disk, but only o those highest numbers o be read and those lowest numbers o be read. Under high disk utilisation, the performance of these echniques increases in ascending order. 29. Name four eviction stra egies for cache blocks or virtual memory pages and s a e which of these is likely o exhibit the best performance under high memory utilisation.

10 Under fully-associative cache, we do not have a direct mapping between main memory addresses genera ed by the CPU and cache, in fact, i ems from main memory can be placed anywhere in cache. In this ins ance, we need o decide on a victim block o remove from cache. These are known as replacement policies and can be of the following forms: random, where we simply randomly replace a block; first in first out, where we remove the block that has been in cache the longest; least recently used, where we remove the block with the oldest times amp; and least frequently used. These are lis ed in ascending order of performance under high memory utilisation. 30. De ermine the maximum speed-up over the sequential execution of (a) a pipelined instruction processing unit comprising six segments and (b) a pipelined floating-point addition unit comprising four segments. Pipelining is the process of at empting o speed up execution time for a ba ch of asks by running them in parallel. For example, we can run the Fe ch-decode-execu e cycle in parallel o process a number of instructions simul aneously. We can formalise this idea with the following equation: ( k x tp ) + ( n - 1 ) tp, where: k is the number of segments or s ages tp is the time per s age and n is the number of instructions or asks. Intuitively this equation says the following: k x tp ells us how long it akes for our first ask. If there are k s ages o the pipeline (k things o do as part of one instruction) then the minimum amount of time is going o be this value multiplied by tp. ( n - 1 ) tp ells us how many more time s eps we need for those parallel instructions which were not able o s art straight away; we say that each one emerges from the pipline, so we need ( n - 1 ) * tp time o do the extra processing which could not be done entirely sequentially. We can rearrange this formula o read as follows: (k + n - 1) tp Our speed up in this ins ance, is therefore our time WITHOUT any pipeline s ages divided by our new speed:

11 s = n x ( k x tp ) [k is 0 by default so n x tp ( asks by time)] divided by (k + n - 1) tp Assuming an infini e number of instructions passing through our pipeline, we actually find that (k + n - 1) ends o the value of n. Thus, we can cancel this, its replacement value of n and tp from the op and bot om our equations leaving just k. So speed up, is effectively EQUAL o the number of s ages in the pipeline. Thus for 6 segments we get 6 and for 4 segments we get Under a pipelined sys em, explain why maximum speed-up cannot be achieved in practice. Although it may appear that speed is entirely proportional o the number of extra s ages in a pipeline, there are several reasons why this is not entirely true. Firstly, there is a fixed overhead of moving da a from memory o regis ers (so-called pipeline s artup ) which cannot ever be comple ed reduced. Moreover, as we add more s ages, the amount of control logic o implement the pipeline increases. Particular pieces of code, such a branching or conditional s a ements, also cause issue with parallel execution. If several instructions are being decoded simul aneously, the conditions enforced by a branch s a ement may be circumven ed, executing code that should not be execu ed. To overcome this issue, pipeline sys ems may specula e about which code will be needed in the future in the form of speculative branching. 32. List the s eps of the Fe ch-execu e Cycle 1. The control unit in the CPU fe ches the next instruction from memory by using the program coun er o de ermine where this next instruction is loca ed. 2.This instruction is then decoded in o a language sui able for the ALU 3. Any da a complementing or required by the instructions are also fe ched from memory and s ored in regis ers 4.The ALU then execu es the instructions and places the results either back in o the regis ers or in o memory. 33. Why are compu ers of en provided with one or more cache memories?

12 As we are striving for the most efficient archi ectures, cache memory aims o address the disparity of speed between main memory on the CPU by providing a fast (yet size limi ed) most recently accessed s ore for da a and instructions. Once information is processed by the CPU it is s ored in the cache, along with information which may be relevant in the future. In this way, overall access time is reduced. 34. Why are compu ers of en provided with paged, virtual memory? The virtual address space which a programmer uses o construct their programs differs from the actual physical address space in which said program resides. Physical address space is not one continuous address but ins ead addresses spread over a number of different media. Main memory, for example, is of en oo small o hold the entirety of a program, so hard disk is used as an ex ension o RAM. To main ain order within this sys em, the units swapped in and out of main memory and the hard disk are s ored in fixed-size pages. Although such a sys em allows for an almost arbitrary ex ension of main memory, access o the hard disk is dramatically slower than o main memory.

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

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

More information

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1 Divide: Paper & Pencil Computer Architecture ALU Design : Division and Floating Point 1001 Quotient Divisor 1000 1001010 Dividend 1000 10 101 1010 1000 10 (or Modulo result) See how big a number can be

More information

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit Decimal Division Remember 4th grade long division? 43 // quotient 12 521 // divisor dividend -480 41-36 5 // remainder Shift divisor left (multiply by 10) until MSB lines up with dividend s Repeat until

More information

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

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

More information

Lecture 8: Binary Multiplication & Division

Lecture 8: Binary Multiplication & Division Lecture 8: Binary Multiplication & Division Today s topics: Addition/Subtraction Multiplication Division Reminder: get started early on assignment 3 1 2 s Complement Signed Numbers two = 0 ten 0001 two

More information

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers This Unit: Floating Point Arithmetic CIS 371 Computer Organization and Design Unit 7: Floating Point App App App System software Mem CPU I/O Formats Precision and range IEEE 754 standard Operations Addition

More information

Data Storage 3.1. Foundations of Computer Science Cengage Learning

Data Storage 3.1. Foundations of Computer Science Cengage Learning 3 Data Storage 3.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List five different data types used in a computer. Describe how

More information

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer Computers CMPT 125: Lecture 1: Understanding the Computer Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University January 3, 2009 A computer performs 2 basic functions: 1.

More information

The string of digits 101101 in the binary number system represents the quantity

The string of digits 101101 in the binary number system represents the quantity Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for

More information

ECE 0142 Computer Organization. Lecture 3 Floating Point Representations

ECE 0142 Computer Organization. Lecture 3 Floating Point Representations ECE 0142 Computer Organization Lecture 3 Floating Point Representations 1 Floating-point arithmetic We often incur floating-point programming. Floating point greatly simplifies working with large (e.g.,

More information

Computer Science 281 Binary and Hexadecimal Review

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

More information

LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology LSN 2 Number Systems Department of Engineering Technology LSN 2 Decimal Number System Decimal number system has 10 digits (0-9) Base 10 weighting system... 10 5 10 4 10 3 10 2 10 1 10 0. 10-1 10-2 10-3

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems - Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x

More information

Attention: This material is copyright 1995-1997 Chris Hecker. All rights reserved.

Attention: This material is copyright 1995-1997 Chris Hecker. All rights reserved. Attention: This material is copyright 1995-1997 Chris Hecker. All rights reserved. You have permission to read this article for your own education. You do not have permission to put it on your website

More information

Number Representation

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

More information

Lecture 2. Binary and Hexadecimal Numbers

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

More information

Binary Numbering Systems

Binary Numbering Systems Binary Numbering Systems April 1997, ver. 1 Application Note 83 Introduction Binary numbering systems are used in virtually all digital systems, including digital signal processing (DSP), networking, and

More information

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

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

More information

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to: Chapter 3 Data Storage Objectives After studying this chapter, students should be able to: List five different data types used in a computer. Describe how integers are stored in a computer. Describe how

More information

PREPARATION FOR MATH TESTING at CityLab Academy

PREPARATION FOR MATH TESTING at CityLab Academy PREPARATION FOR MATH TESTING at CityLab Academy compiled by Gloria Vachino, M.S. Refresh your math skills with a MATH REVIEW and find out if you are ready for the math entrance test by taking a PRE-TEST

More information

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: Exercises 1 - number representations Questions 1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: (a) 3012 (b) - 435 2. For each of

More information

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

(Refer Slide Time: 00:01:16 min) Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control

More information

CS321. Introduction to Numerical Methods

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

More information

Welcome to Basic Math Skills!

Welcome to Basic Math Skills! Basic Math Skills Welcome to Basic Math Skills! Most students find the math sections to be the most difficult. Basic Math Skills was designed to give you a refresher on the basics of math. There are lots

More information

MATH-0910 Review Concepts (Haugen)

MATH-0910 Review Concepts (Haugen) Unit 1 Whole Numbers and Fractions MATH-0910 Review Concepts (Haugen) Exam 1 Sections 1.5, 1.6, 1.7, 1.8, 2.1, 2.2, 2.3, 2.4, and 2.5 Dividing Whole Numbers Equivalent ways of expressing division: a b,

More information

CHAPTER 5 Round-off errors

CHAPTER 5 Round-off errors CHAPTER 5 Round-off errors In the two previous chapters we have seen how numbers can be represented in the binary numeral system and how this is the basis for representing numbers in computers. Since any

More information

Binary Adders: Half Adders and Full Adders

Binary Adders: Half Adders and Full Adders Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order

More information

Numerical Matrix Analysis

Numerical Matrix Analysis Numerical Matrix Analysis Lecture Notes #10 Conditioning and / Peter Blomgren, blomgren.peter@gmail.com Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research

More information

This 3-digit ASCII string could also be calculated as n = (Data[2]-0x30) +10*((Data[1]-0x30)+10*(Data[0]-0x30));

This 3-digit ASCII string could also be calculated as n = (Data[2]-0x30) +10*((Data[1]-0x30)+10*(Data[0]-0x30)); Introduction to Embedded Microcomputer Systems Lecture 5.1 2.9. Conversions ASCII to binary n = 100*(Data[0]-0x30) + 10*(Data[1]-0x30) + (Data[2]-0x30); This 3-digit ASCII string could also be calculated

More information

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

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

More information

Numbering Systems. InThisAppendix...

Numbering Systems. InThisAppendix... G InThisAppendix... Introduction Binary Numbering System Hexadecimal Numbering System Octal Numbering System Binary Coded Decimal (BCD) Numbering System Real (Floating Point) Numbering System BCD/Binary/Decimal/Hex/Octal

More information

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

EE 261 Introduction to Logic Circuits. Module #2 Number Systems EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook

More information

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

More information

2010/9/19. Binary number system. Binary numbers. Outline. Binary to decimal

2010/9/19. Binary number system. Binary numbers. Outline. Binary to decimal 2/9/9 Binary number system Computer (electronic) systems prefer binary numbers Binary number: represent a number in base-2 Binary numbers 2 3 + 7 + 5 Some terminology Bit: a binary digit ( or ) Hexadecimal

More information

Chapter 5 Instructor's Manual

Chapter 5 Instructor's Manual The Essentials of Computer Organization and Architecture Linda Null and Julia Lobur Jones and Bartlett Publishers, 2003 Chapter 5 Instructor's Manual Chapter Objectives Chapter 5, A Closer Look at Instruction

More information

Binary Number System. 16. Binary Numbers. Base 10 digits: 0 1 2 3 4 5 6 7 8 9. Base 2 digits: 0 1

Binary Number System. 16. Binary Numbers. Base 10 digits: 0 1 2 3 4 5 6 7 8 9. Base 2 digits: 0 1 Binary Number System 1 Base 10 digits: 0 1 2 3 4 5 6 7 8 9 Base 2 digits: 0 1 Recall that in base 10, the digits of a number are just coefficients of powers of the base (10): 417 = 4 * 10 2 + 1 * 10 1

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 2 Basic Structure of Computers Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Functional Units Basic Operational Concepts Bus Structures Software

More information

Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML. By Prashanth Tilleti

Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML. By Prashanth Tilleti Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML By Prashanth Tilleti Advisor Dr. Matthew Fluet Department of Computer Science B. Thomas Golisano

More information

Useful Number Systems

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

More information

NUMBER SYSTEMS. 1.1 Introduction

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

More information

2011, The McGraw-Hill Companies, Inc. Chapter 3

2011, The McGraw-Hill Companies, Inc. Chapter 3 Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through

More information

Arithmetic in MIPS. Objectives. Instruction. Integer arithmetic. After completing this lab you will:

Arithmetic in MIPS. Objectives. Instruction. Integer arithmetic. After completing this lab you will: 6 Objectives After completing this lab you will: know how to do integer arithmetic in MIPS know how to do floating point arithmetic in MIPS know about conversion from integer to floating point and from

More information

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic Today Binary addition Representing negative numbers 2 Binary Addition Consider the following binary numbers: 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1 How do we add these numbers? 3 Binary Addition 0 0 1 0 0 1 1

More information

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12 C5 Solutions 1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12 To Compute 0 0 = 00000000 To Compute 1 Step 1. Convert 1 to binary 00000001 Step 2. Flip the bits 11111110

More information

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1 UNIT 22: PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1 This work covers part of outcome 2 of the Edexcel standard module. The material is

More information

Operation Count; Numerical Linear Algebra

Operation Count; Numerical Linear Algebra 10 Operation Count; Numerical Linear Algebra 10.1 Introduction Many computations are limited simply by the sheer number of required additions, multiplications, or function evaluations. If floating-point

More information

CSI 333 Lecture 1 Number Systems

CSI 333 Lecture 1 Number Systems CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...

More information

Counters and Decoders

Counters and Decoders Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4-bit ripple-through decade counter with a decimal read-out display. Such a counter

More information

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit. Objectives The Central Processing Unit: What Goes on Inside the Computer Chapter 4 Identify the components of the central processing unit and how they work together and interact with memory Describe how

More information

Number and codes in digital systems

Number and codes in digital systems Number and codes in digital systems Decimal Numbers You are familiar with the decimal number system because you use them everyday. But their weighted structure is not understood. In the decimal number

More information

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

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture

More information

FAST INVERSE SQUARE ROOT

FAST INVERSE SQUARE ROOT FAST INVERSE SQUARE ROOT CHRIS LOMONT Abstract. Computing reciprocal square roots is necessary in many applications, such as vector normalization in video games. Often, some loss of precision is acceptable

More information

HOMEWORK # 2 SOLUTIO

HOMEWORK # 2 SOLUTIO HOMEWORK # 2 SOLUTIO Problem 1 (2 points) a. There are 313 characters in the Tamil language. If every character is to be encoded into a unique bit pattern, what is the minimum number of bits required to

More information

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer. Guest lecturer: David Hovemeyer November 15, 2004 The memory hierarchy Red = Level Access time Capacity Features Registers nanoseconds 100s of bytes fixed Cache nanoseconds 1-2 MB fixed RAM nanoseconds

More information

CALCULATIONS & STATISTICS

CALCULATIONS & STATISTICS CALCULATIONS & STATISTICS CALCULATION OF SCORES Conversion of 1-5 scale to 0-100 scores When you look at your report, you will notice that the scores are reported on a 0-100 scale, even though respondents

More information

Let s put together a Manual Processor

Let s put together a Manual Processor Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1 The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce

More information

Basic Use of the TI-84 Plus

Basic Use of the TI-84 Plus Basic Use of the TI-84 Plus Topics: Key Board Sections Key Functions Screen Contrast Numerical Calculations Order of Operations Built-In Templates MATH menu Scientific Notation The key VS the (-) Key Navigation

More information

The Mathematics 11 Competency Test Percent Increase or Decrease

The Mathematics 11 Competency Test Percent Increase or Decrease The Mathematics 11 Competency Test Percent Increase or Decrease The language of percent is frequently used to indicate the relative degree to which some quantity changes. So, we often speak of percent

More information

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın Digital Design Assoc. Prof. Dr. Berna Örs Yalçın Istanbul Technical University Faculty of Electrical and Electronics Engineering Office Number: 2318 E-mail: siddika.ors@itu.edu.tr Grading 1st Midterm -

More information

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

More information

Chapter 2 Logic Gates and Introduction to Computer Architecture

Chapter 2 Logic Gates and Introduction to Computer Architecture Chapter 2 Logic Gates and Introduction to Computer Architecture 2.1 Introduction The basic components of an Integrated Circuit (IC) is logic gates which made of transistors, in digital system there are

More information

26 Integers: Multiplication, Division, and Order

26 Integers: Multiplication, Division, and Order 26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue

More information

EE361: Digital Computer Organization Course Syllabus

EE361: Digital Computer Organization Course Syllabus EE361: Digital Computer Organization Course Syllabus Dr. Mohammad H. Awedh Spring 2014 Course Objectives Simply, a computer is a set of components (Processor, Memory and Storage, Input/Output Devices)

More information

Fractions. If the top and bottom numbers of a fraction are the same then you have a whole one.

Fractions. If the top and bottom numbers of a fraction are the same then you have a whole one. What do fractions mean? Fractions Academic Skills Advice Look at the bottom of the fraction first this tells you how many pieces the shape (or number) has been cut into. Then look at the top of the fraction

More information

6 3 The Standard Normal Distribution

6 3 The Standard Normal Distribution 290 Chapter 6 The Normal Distribution Figure 6 5 Areas Under a Normal Distribution Curve 34.13% 34.13% 2.28% 13.59% 13.59% 2.28% 3 2 1 + 1 + 2 + 3 About 68% About 95% About 99.7% 6 3 The Distribution Since

More information

Proof of the conservation of momentum and kinetic energy

Proof of the conservation of momentum and kinetic energy Experiment 04 Proof of the conservation of momentum and kinetic energy By Christian Redeker 27.10.2007 Contents 1.) Hypothesis...3 2.) Diagram...7 3.) Method...7 3.1) Apparatus...7 3.2) Procedure...7 4.)

More information

Cobol. By: Steven Conner. COBOL, COmmon Business Oriented Language, one of the. oldest programming languages, was designed in the last six

Cobol. By: Steven Conner. COBOL, COmmon Business Oriented Language, one of the. oldest programming languages, was designed in the last six Cobol By: Steven Conner History: COBOL, COmmon Business Oriented Language, one of the oldest programming languages, was designed in the last six months of 1959 by the CODASYL Committee, COnference on DAta

More information

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1. MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column

More information

Binary Representation

Binary Representation Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must tbe able to handle more than just values for real world problems

More information

3 cups ¾ ½ ¼ 2 cups ¾ ½ ¼. 1 cup ¾ ½ ¼. 1 cup. 1 cup ¾ ½ ¼ ¾ ½ ¼. 1 cup. 1 cup ¾ ½ ¼ ¾ ½ ¼

3 cups ¾ ½ ¼ 2 cups ¾ ½ ¼. 1 cup ¾ ½ ¼. 1 cup. 1 cup ¾ ½ ¼ ¾ ½ ¼. 1 cup. 1 cup ¾ ½ ¼ ¾ ½ ¼ cups cups cup Fractions are a form of division. When I ask what is / I am asking How big will each part be if I break into equal parts? The answer is. This a fraction. A fraction is part of a whole. The

More information

1.6 The Order of Operations

1.6 The Order of Operations 1.6 The Order of Operations Contents: Operations Grouping Symbols The Order of Operations Exponents and Negative Numbers Negative Square Roots Square Root of a Negative Number Order of Operations and Negative

More information

How do you compare numbers? On a number line, larger numbers are to the right and smaller numbers are to the left.

How do you compare numbers? On a number line, larger numbers are to the right and smaller numbers are to the left. The verbal answers to all of the following questions should be memorized before completion of pre-algebra. Answers that are not memorized will hinder your ability to succeed in algebra 1. Number Basics

More information

Storing Measurement Data

Storing Measurement Data Storing Measurement Data File I/O records or reads data in a file. A typical file I/O operation involves the following process. 1. Create or open a file. Indicate where an existing file resides or where

More information

Traditional IBM Mainframe Operating Principles

Traditional IBM Mainframe Operating Principles C H A P T E R 1 7 Traditional IBM Mainframe Operating Principles WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Distinguish between an absolute address and a relative address. Briefly explain

More information

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

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

More information

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions. Unit 1 Number Sense In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions. BLM Three Types of Percent Problems (p L-34) is a summary BLM for the material

More information

MACHINE INSTRUCTIONS AND PROGRAMS

MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations

More information

for ECM Titanium) This guide contains a complete explanation of the Driver Maker plug-in, an add-on developed for

for ECM Titanium) This guide contains a complete explanation of the Driver Maker plug-in, an add-on developed for Driver Maker User Guide (Plug-in for ECM Titanium) Introduction This guide contains a complete explanation of the Driver Maker plug-in, an add-on developed for ECM Titanium, the chip-tuning software produced

More information

Monday January 19th 2015 Title: "Transmathematics - a survey of recent results on division by zero" Facilitator: TheNumberNullity / James Anderson, UK

Monday January 19th 2015 Title: Transmathematics - a survey of recent results on division by zero Facilitator: TheNumberNullity / James Anderson, UK Monday January 19th 2015 Title: "Transmathematics - a survey of recent results on division by zero" Facilitator: TheNumberNullity / James Anderson, UK It has been my pleasure to give two presentations

More information

İSTANBUL AYDIN UNIVERSITY

İSTANBUL AYDIN UNIVERSITY İSTANBUL AYDIN UNIVERSITY FACULTY OF ENGİNEERİNG SOFTWARE ENGINEERING THE PROJECT OF THE INSTRUCTION SET COMPUTER ORGANIZATION GÖZDE ARAS B1205.090015 Instructor: Prof. Dr. HASAN HÜSEYİN BALIK DECEMBER

More information

Year 9 set 1 Mathematics notes, to accompany the 9H book.

Year 9 set 1 Mathematics notes, to accompany the 9H book. Part 1: Year 9 set 1 Mathematics notes, to accompany the 9H book. equations 1. (p.1), 1.6 (p. 44), 4.6 (p.196) sequences 3. (p.115) Pupils use the Elmwood Press Essential Maths book by David Raymer (9H

More information

MEP Y9 Practice Book A

MEP Y9 Practice Book A 1 Base Arithmetic 1.1 Binary Numbers We normally work with numbers in base 10. In this section we consider numbers in base 2, often called binary numbers. In base 10 we use the digits 0, 1, 2, 3, 4, 5,

More information

Working with whole numbers

Working with whole numbers 1 CHAPTER 1 Working with whole numbers In this chapter you will revise earlier work on: addition and subtraction without a calculator multiplication and division without a calculator using positive and

More information

EC 362 Problem Set #2

EC 362 Problem Set #2 EC 362 Problem Set #2 1) Using Single Precision IEEE 754, what is FF28 0000? 2) Suppose the fraction enhanced of a processor is 40% and the speedup of the enhancement was tenfold. What is the overall speedup?

More information

CS201: Architecture and Assembly Language

CS201: Architecture and Assembly Language CS201: Architecture and Assembly Language Lecture Three Brendan Burns CS201: Lecture Three p.1/27 Arithmetic for computers Previously we saw how we could represent unsigned numbers in binary and how binary

More information

6.4 Normal Distribution

6.4 Normal Distribution Contents 6.4 Normal Distribution....................... 381 6.4.1 Characteristics of the Normal Distribution....... 381 6.4.2 The Standardized Normal Distribution......... 385 6.4.3 Meaning of Areas under

More information

on an system with an infinite number of processors. Calculate the speedup of

on an system with an infinite number of processors. Calculate the speedup of 1. Amdahl s law Three enhancements with the following speedups are proposed for a new architecture: Speedup1 = 30 Speedup2 = 20 Speedup3 = 10 Only one enhancement is usable at a time. a) If enhancements

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

JobTestPrep's Numeracy Review Decimals & Percentages

JobTestPrep's Numeracy Review Decimals & Percentages JobTestPrep's Numeracy Review Decimals & Percentages 1 Table of contents What is decimal? 3 Converting fractions to decimals 4 Converting decimals to fractions 6 Percentages 6 Adding and subtracting decimals

More information

Central Processing Unit (CPU)

Central Processing Unit (CPU) Central Processing Unit (CPU) CPU is the heart and brain It interprets and executes machine level instructions Controls data transfer from/to Main Memory (MM) and CPU Detects any errors In the following

More information

Count the Dots Binary Numbers

Count the Dots Binary Numbers Activity 1 Count the Dots Binary Numbers Summary Data in computers is stored and transmitted as a series of zeros and ones. How can we represent words and numbers using just these two symbols? Curriculum

More information

8 Square matrices continued: Determinants

8 Square matrices continued: Determinants 8 Square matrices continued: Determinants 8. Introduction Determinants give us important information about square matrices, and, as we ll soon see, are essential for the computation of eigenvalues. You

More information

An Efficient RNS to Binary Converter Using the Moduli Set {2n + 1, 2n, 2n 1}

An Efficient RNS to Binary Converter Using the Moduli Set {2n + 1, 2n, 2n 1} An Efficient RNS to Binary Converter Using the oduli Set {n + 1, n, n 1} Kazeem Alagbe Gbolagade 1,, ember, IEEE and Sorin Dan Cotofana 1, Senior ember IEEE, 1. Computer Engineering Laboratory, Delft University

More information

CHAPTER 4 MARIE: An Introduction to a Simple Computer

CHAPTER 4 MARIE: An Introduction to a Simple Computer CHAPTER 4 MARIE: An Introduction to a Simple Computer 4.1 Introduction 195 4.2 CPU Basics and Organization 195 4.2.1 The Registers 196 4.2.2 The ALU 197 4.2.3 The Control Unit 197 4.3 The Bus 197 4.4 Clocks

More information

DEPARTMENT OF INFORMATION TECHNLOGY

DEPARTMENT OF INFORMATION TECHNLOGY DRONACHARYA GROUP OF INSTITUTIONS, GREATER NOIDA Affiliated to Mahamaya Technical University, Noida Approved by AICTE DEPARTMENT OF INFORMATION TECHNLOGY Lab Manual for Computer Organization Lab ECS-453

More information

3. Convert a number from one number system to another

3. Convert a number from one number system to another 3. Convert a number from one number system to another Conversion between number bases: Hexa (16) Decimal (10) Binary (2) Octal (8) More Interest Way we need conversion? We need decimal system for real

More information

CHAPTER 7: The CPU and Memory

CHAPTER 7: The CPU and Memory CHAPTER 7: The CPU and Memory The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides

More information

Quiz for Chapter 1 Computer Abstractions and Technology 3.10

Quiz for Chapter 1 Computer Abstractions and Technology 3.10 Date: 3.10 Not all questions are of equal difficulty. Please review the entire quiz first and then budget your time carefully. Name: Course: Solutions in Red 1. [15 points] Consider two different implementations,

More information

The BBP Algorithm for Pi

The BBP Algorithm for Pi The BBP Algorithm for Pi David H. Bailey September 17, 2006 1. Introduction The Bailey-Borwein-Plouffe (BBP) algorithm for π is based on the BBP formula for π, which was discovered in 1995 and published

More information