This action might not be possible to undo. Are you sure you want to continue?

1

**Introduction to Computer Organization
**

∗

Don Johnson

This work is produced by The Connexions Project and licensed under the Creative Commons Attribution License †

Abstract Explains how digital systems such as the computer represent numbers. Covers the basics of boolean algebra and binary math.

1 Computer Architecture

To understand digital signal processing systems, we must understand a little about how computers compute. The modern denition of a computer is an electronic device that performs calculations on data, presenting the results to humans or other computers in a variety of (hopefully useful) ways.

Organization of a Simple Computer

CPU Memory I/O Interface

Keyboard

CRT

Disks

Network

Figure 1: Generic computer hardware organization.

The generic computer contains input devices (keyboard, mouse, A/D (analog-to-digital) converter, etc.), a computational unit, and output devices (monitors, printers, D/A converters). The computational unit

∗ †

Version 2.28: Jun 11, 2009 9:25 am GMT-5 http://creativecommons.org/licenses/by/1.0

http://cnx.org/content/m10263/2.28/

or a division does so only for integers. • A simple computer operates fundamentally in discrete time. • Computers perform integer (discrete-valued) computations. in which computational steps occur periodically according to ticks of a clock. but very limiting when it comes to arithmetic calculations: ever tried to divide two Roman numerals? 3 "Complex Numbers" <http://cnx. Computer calculations can be numeric (obeying the laws of arithmetic). Digital computers use the base 2 or binary number representation. however. . The number 25 in base 10 equals 2×10 +5×10 .org/content/m10263/2. For http://cnx. example. dk ∈ {0. 1 Focusing on numbers." you mean that your computer takes 1 nanosecond to perform each step. . Your 1 GHz computer (clock speed) may have a computational speed of 200 Mips. This description belies clock speed: When you say "I have a 1 GHz computer. . All of names. b − 1} : f= k=−∞ dk bk 3 (2) numbers can be represented by their sign. At its heart. This same number in binary (base 2) equals 11001 (1 × 2 + 1 × 2 + 0 × 2 + 0 × 2 + 1 × 2 ) and 19 in hexadecimal (base 16). . What I/O devices might be present on a given computer vary greatly. integer and fractional parts. That is incredibly fast! A "step" does not. and all other d equal zero. which means that the clock speed need not express the computational speed.org/content/m0081/latest/> 1 An example of a symbolic computation is sorting a list 2 Alternative number representation systems exist. b − 1} : n = and we succinctly express n in base-b as n = d d . each digit of which is known as a bit (binary digit). Fractions between zero and one are represented the same way. These were useful in ancient times. The sum or product of two integers is also an integer. commonly assumed to be due to us having ten ngers. necessarily mean a computation like an addition. we could use stick gure counting or Roman numerals.Connexions module: m10263 2 is the computer's heart. this representation relies on integer-valued computations. Mathematically. Humans use base 10. Computational speed is expressed in units of millions of instructions/second (Mips). . Each computer instruction that performs an elementary numeric calculation an addition.28/ . 2 2 Representing Numbers ∞ k k k k k=0 b N N −1 0 4 0 1 0 1 3 2 1 k 0 −1 ∀dk . Complex numbers can be thought of as two real numbers that obey special rules to manipulate them. The quantity b is known as the base of the number system. computers break such computations down into several stages. How does a computer deal with numbers that have digits to the right of the decimal point? This problem is addressed by using the so-called oating-point representation of real numbers. and usually consists of a central processing unit (CPU). . but the quotient of two integers is likely to not be an integer. The b-ary positional representation system uses the position of digits ranging from 0 to b-1 to denote a number. positional systems represent the positive integer n as d b (1) ∀d . . a multiplication. d . unfortunately. . and an input/output (I/O) interface. d ∈ {0. or symbolic (obeying any law you like). all numbers can represented by the positional notation system. d = 2. Computers are clocked devices. logical (obeying the laws of an algebra). a memory. so that the digits representing this number are d = 5. . .

32. The sign of the mantissa represents the sign of the number and the exponent can be a signed integer. how are numbers that have fractional parts represented? For such numbers. the latter situation occurring when the integer exceeds the range of numbers that a limited set of bytes can represent. a collection of eight bits. Floating point representations have similar representation problems: if the number x can be multiplied/divided by enough powers of two to yield a fraction lying between 1/2 and 1 that has a nite binary-fraction representation. 4 You need one more 5 In some computers. how about numbers having nonzero digits to the right of the decimal point? In other words. we are restricted to those that have a nite binary representation. A byte can therefore represent an unsigned number ranging from 0 to 255. While this system represents integers well. But a computer cannot represent all possible real numbers. The number zero is an exception to this rule.org/content/m10263/2. what are the largest numbers that can be represented if a sign bit must also be included. x = m2 (3) The mantissa is usually taken to be a binary fraction having a magnitude in the range . and it is the only oating point number having a zero fraction. This convention is known as the hidden-ones notation.to represent the number. a number almost big enough to enumerate every human in the world! Exercise 1 (Solution on p. Since we want to store many numbers in a computer's memory. 6.typically 4 or 8 . we tack on a special bitthe sign bitto express the sign. an unsigned 32-bit number can represent integers ranging between 0 and 2 − 1 (4. each bit is represented as a voltage that is either "high" or "low. this normalization is taken to an extreme: the leading binary digit is not explicitly expressed. While a gigabyte of memory may seem to be a lot. but with one byte (sometimes two bytes) reserved to represent the exponente of a power-of-two multiplier for the number . but with a little more complexity. The fault is not with the binary number system.Connexions module: m10263 3 Number representations on computers d7 d6 d5 d4 d3 d2 d1 d0 unsigned 8-bit integer s s d6 d5 d4 d3 d2 d1 d0 signed 8-bit integer s exponent mantissa floating point Figure 2: The various ways numbers are represented in binary are illustrated. usually expressed in terms of the number of bits. Here. 1 . Thus.the mantissam expressed by the remaining bytes. are 16. it takes an innite number of bits to represent π." respectively." thereby representing "1" or "0. The number of bytes for the exponent and mantissa components of oating point numbers varies. Large integers can be represented by an ordered sequence of bytes. the 32 4 e −1 5 1 2 bit to do that. and 64.294. the binary representation system is used. Common lengths. The oating-point system uses a number of bytes . If we take one of the bits and make it the sign bit. providing an extra bit to represent the mantissa a little more accurately. which means that the binary representation is such that d = 1. rather having only a nite number of bytes is the problem.28/ . we can make the same byte to represent numbers ranging from −128 to 127. A computer's representation of integers is either perfect or only approximate. To represent signed values.) For both 32-bit and 64-bit integer representations.295).967. The computer's memory consists of an ordered sequence of bytes. http://cnx.

represents a 8 can nd this representation.) Add twenty-ve and seven in base 2. Double precision oating point numbers consume 8 bytes. which require 32 bits (one byte for the exponent and the remaining 24 bits for the mantissa). This level of accuracy may not suce in numerical calculations.) What are the largest and smallest numbers that can be represented in 32-bit oating point? in 64-bit oating point that has sixteen bits allocated to the exponent? Note that both exponent and mantissa require a sign bit. The choice of base denes which do and which don't. 6. 1 + 1 = 10 is an example of a computation that involves a carry. 6 See if you 7 Note that http://cnx. For example. the AND of A and B. and underlies the entire eld of numerical analysis. the number 2. Such inexact numbers have an innite binary representation.6 will be represented as 2. when does addition cause problems?) 2 6 7 3 Computer Arithmetic and Logic The binary addition and multiplication tables are 0+0=0 0+1=1 1 + 1 = 10 1+0=1 0×0=0 0×1=0 1×1=1 1×0=0 (4) Note that if carries are ignored. So long as the integers aren't too large.org/content/m10263/2. Exercise 3 (Solution on p.. Realizing that real numbers can be only represented approximately is quite important. Note that this approximation has a much longer decimal expansion. subtraction of two single-digit binary numbers yields the same bit as addition.Connexions module: m10263 4 number is represented exactly in oating point. This increasing accuracy means that more numbers can be represented exactly.28/ . there will always be numbers that have an innite representation in any chosen positional system. Why is the result "nice"? Also note that the logical operations of AND and OR are equivalent to binary addition (again if carries are ignored). However. and only be represented approximately in oating point. which seeks to predict the numerical accuracy of any computation..625 × 2 .600000079. Otherwise. The more bits used in the mantissa. they can be represented exactly in a computer using the binary positional notation. If you were thinking that base 10 numbers would solve this inaccuracy. 6. and quadruple precision 16 bytes. not catastrophically in error as with integers. has an innite representation in decimal (and binary for that matter). Note the carries that might occur. 8 A carry means that a computation performed at a given position aects other positions as well. Logic circuits perform arithmetic operations.6 does not have an exact binary representation. In single precision oating point numbers..333333. the greater the accuracy. Here. The variables of logic indicate truth or falsehood. note that 1/3 = 0. Computers use high and low voltage values to express a bit. but has nite representation in base 3. the fractional part of which has an exact binary representation. but there are always some that cannot.. A B.. the number 2.5 equals 0. the number 2. Exercise 2 (Solution on p. (This statement isn't quite true. and an array of such voltages express numbers akin to positional notation. we can only represent the number approximately. Electronic circuits that make up the physical computer can add and subtract integers without error..

Connexions module: m10263 5 statement that both A and B must be true for the statement to be true. The Irish mathematician George Boole discovered this equivalence in the mid-nineteenth century. You use this kind of statement to tell search engines that you want to restrict hits to cases where both of the events A and B occur. yields a value of truth if either is true. It laid the foundation for what we now call Boolean algebra.28/ . which expresses as equations logical statements. A B. Note that if we represent truth by a "1" and falsehood by a "0." binary multiplication corresponds to AND and addition (ignoring carries) to OR.org/content/m10263/2. the OR of A and B. http://cnx. More importantly. any computer using base-2 representations and arithmetic can also easily evaluate logical statements. This fact makes an integer-based computational device much more powerful than might be apparent.

For b = 32. we have 2. For 64-bit oating point.28/ .854. Solution to Exercise 3 (p.Connexions module: m10263 6 Solutions to Exercises in this Module Solution to Exercise 1 (p. 4) In oating point. We nd that 11001 + 111 = 100000 = 32.org/content/m10263/2. the largest number is 2 − 1.9 × 10 ).775. 4) 25 = 11011 and 7 = 111 . Solution to Exercise 2 (p. the largest number is about 10 . we have 9. the largest (smallest) numbers are 2 = 1.483.2 × 10 . For 32-bit oating point. b−1 18 ±127 38 −39 9863 2 2 2 2 2 http://cnx.647 and for b = 64.223.7 × 10 (5.147. the number of bits in the exponent determines the largest and smallest representable numbers.372.036.807 or about 9. 3) For b-bit signed integers.

- Vending Machine Class Activity
- Lecture 18
- ASEE_BallooningArticleFinal
- Lab Report - Springer
- Filters with LabView
- Superposition
- Multisim (TM)
- Neuroelectronics
- Fuzzy Logic Type II and GA Tuning
- Fuzzy Logic Type II and GA Tuning by Wu, Dongrui
- Genetic Fuzzy Systems
- Trs 3232
- Field Mapping
- ET AVR STARTER KIT
- Motores de Pasos Copy
- M525 V1.1 Motherboard
- TDA2003
- 27256 EPROM

An Outline of Computer Architecture

An Outline of Computer Architecture

- m10263
- Discrete Maths 2002 Lecture 04 3 Slides Pp
- UT Dallas Syllabus for se4340.081 06u taught by Galigekere Dattatreya (datta)
- computer system architecture
- Discrete Structures
- 20160910230936_RI MTN3013 A161 Mr Salman
- Foundation of Switching Theory and Logic Design
- Micro Excellent
- Binary and Decimal Numbers
- NO 2
- Data Representation in a Computer
- 103 24th.pptx
- Binary and Decimal Numbers Feb0605
- 02-BinaryArithmetic
- lec01-numbers.pdf
- number system'.pptx
- Computer Number Systems, Approximation in Numerical Computation
- Sign Magnitude
- Atari ST Machine Language
- lec3
- 01 Number Systems
- coding > Tutorial Assembly for nerds using linux - part 1
- Chap1.1 Computer Introduction
- 09
- Digital Electronics
- Lecture 1 - Why Digital
- Chapter 3 - Number Systems and Codes
- CONVERSION
- Binary Division by a Constant
- Untitled
- Computer Architecture

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd