cse 303 computer organization n.
Skip this Video
Loading SlideShow in 5 Seconds..
CSE 303 COMPUTER ORGANIZATION PowerPoint Presentation
Download Presentation

Loading in 2 Seconds...

play fullscreen
1 / 52

CSE 303 COMPUTER ORGANIZATION - PowerPoint PPT Presentation

  • Uploaded on

CSE 303 COMPUTER ORGANIZATION. Yrd. Doç. Dr. Mehmet Ali Aktaş. Data Representation in Computer Systems. The organization of any computer depends considerably on how it represents numbers , characters, and control information .

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'CSE 303 COMPUTER ORGANIZATION' - cain

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
cse 303 computer organization


Yrd. Doç. Dr. Mehmet Ali Aktaş

data representation in computer systems
Data Representation inComputerSystems
  • The organization of any computer depends considerably on how it representsnumbers, characters, and control information.
  • The most basic unit of information in a digital computer is called a bit, whichis a contraction of binary digit. In the concrete sense, a bit is nothing more than astate of “on” or “off ” (or “high” and “low”) within a computer circuit.
  • Computer words consist of two or more adjacent bytes that are sometimesaddressed and almost always are manipulated collectively. The word size representsthe data size that is handled most efficiently by a particular architecture.
  • Words can be 16 bits, 32 bits, 64 bits, or any other size that makes sense withinthe context of a computer’s organization (including sizes that are not multiples ofeight).
data representation in computer systems1
Data Representation inComputerSystems
  • Positional NumberingSystems
  • The set of valid numerals for a positional numbering system is equal in sizeto the radix of that system. For example, there are 10 digits in the decimal system,0 through 9, and 3 digits for the ternary (base 3) system, 0, 1, and 2.
  • To distinguish among numbers in differentradices, we use the radix as a subscript, such as in to represent the decimalnumber 33.
  • EXAMPLE Three numbers represented as powers of a radix.
data representation in computer systems2
Data Representation inComputerSystems
  • The two most important radices in computer science are binary (base two), andhexadecimal (base 16). Another radix of interest is octal (base 8). The binary systemuses only the digits 0 and 1; the octal system, 0 through 7. The hexadecimalsystem allows the digits 0 through 9 with A, B, C, D, E, and F being used to representthe numbers 10 through 15.
data representation in computer systems4
Data Representation inComputerSystems
  • DecimalToBinaryConversions.
    • ConvertingUnsignedWholeNumbers
  • Conversion between base systems can be done by using either repeated subtractionor a division-remainder method. The subtraction method is cumbersomeand requires a familiarity with the powers of the radix being used. Being the moreintuitive of the two methods, however, we will explain it first.
  • As an example, let’s say that we want to convert to base 3.
data representation in computer systems6
Data Representation inComputerSystems
  • The division-remainder method is faster and easier than the repeated subtractionmethod. It employs the idea that successive divisions by the base are in fact successivesubtractions by powers of the base. The remainders that we get when wesequentially divide by the base end up being the digits of the result, which areread from bottom to top.
data representation in computer systems7
Data Representation inComputerSystems
  • This method works with any base, and because of the simplicity of the calculations,it is particularly useful in converting from decimal to binary. Example showssuch a conversion.
data representation in computer systems9
Data Representation inComputerSystems
    • ConvertingFractions
  • Fractions in any base system can be approximated in any other base system usingnegative powers of a radix. Radix points separate the integer part of a numberfrom its fractional part. In the decimal system, the radix point is called a decimalpoint. Binary fractions have a binary point.
data representation in computer systems12
Data Representation inComputerSystems
  • The methods just described can be used to directly convert any number in anybase to any other base, say from base 4 to base 3 (as in Example).
  • Itshould be first convertedto base 10 and then tothedesiredbase.
data representation in computer systems14
Data Representation inComputerSystems
    • ConvertingbetweenPower-of-TwoRadices
  • Binary numbers are often expressed in hexadecimal—and sometimes octal—toimprovetheirreadability.
  • Because , a group of 4 bits (called a hextet) iseasily recognized as a hexadecimal digit. Similarly, with , a group of 3 bits(called an octet) is expressible as one octal digit.
  • Using theserelationships, wecan therefore convert a number from binary to octal or hexadecimal by doing littlemore than looking at it.
data representation in computer systems16
Data Representation inComputerSystems
  • If we wanted to build a real computer, we could use any of the integer representationsthatwejuststudied.
  • We would pick one of them and proceed with our designtasks.
  • Formany years, clever programming enabled these integer systems to act as if theywere, in fact, floating-point systems.
data representation in computer systems17
Data Representation inComputerSystems
  • If you are familiar with scientific notation, you may already be thinking of howyou could handle floating-point operations.
  • In scientific notation, numbers are expressed in twoparts: a fractional part, called a mantissa, and an exponential part that indicates thepower of ten to which the mantissa should be raised to obtain the value we need.
  • It is also the basis for floating-point computation in today’s digital computers.
data representation in computer systems18
Data Representation inComputerSystems
  • In digital computers, floating-point numbers consist of three parts: a sign bit, anexponent part (representing the exponent on a power of 2), and a fractional partcalled a significand(which is a fancy word for a mantissa).
  • Thenumber of bitsused for the exponent and significand depends on whether we would like to optimizefor range (more bits in the exponent) or precision (more bits in the significand).
  • Forexample, ifweneedtostore the decimal number 17 in14-bit model (as shown in Figure)with a 5-bitexponent, an 8-bit significand, and a sign bit.
data representation in computer systems19
Data Representation inComputerSystems
  • Weknowthat
  • Analogously, in binary,
  • If we use this last form, our fractional part will be 10001000 andour exponent will be 00101, as shown here:
boolean algebra and digital logic
  • Boolean algebra is an algebra for the manipulation of objects that can take ononly two values, typically true and false.
  • Because computers are built as collections of switches that are either “on” or“off,” Boolean algebra is a very natural way to represent digital information.
  • Inreality, digital circuits use low and high voltages, but for our level of understanding,0 and 1 will suffice.
boolean algebra and digital logic1
  • It is common to interpret the digital value 0 as false andthe digital value 1 as true.
  • A Boolean function typically has one or more inputvalues and yields a result, based on these input values, in the range {0,1}.
  • Three common Boolean operators are AND, OR, and NOT. To better understandthese operators, we need a mechanism to allow us to examine their behaviors.
boolean algebra and digital logic2
  • A Boolean operator can be completely described using a table that lists theinputs, all possible values for these inputs, and the resulting values of the operationfor all possible combinations of these inputs.
  • This table is called a truthtable. A truth table shows the relationship, in tabular form, between the input valuesand the result of a specific Boolean operator or function on the input variables.
  • Let’s look at the Boolean operators AND, OR, and NOT to see how each isrepresented, using both Boolean algebra and truth tables.
boolean algebra and digital logic3
  • The logical operator AND is typically represented by either a dot or no symbolat all. For example, the Boolean expression xyis equivalent to the expressionx · y and is read “x and y.” The expression xyis often referred to as a Booleanproduct.
  • The behavior of this operator is characterized by the truth table shown inTable
boolean algebra and digital logic4
  • The Boolean operator OR is typically represented by a plus sign. Therefore,the expression x + y is read “x or y.”
  • Thetruth table for OR is shown in Table.
boolean algebra and digital logic5
  • The remaining logical operator, NOT, is represented typically by either anoverscoreor a prime. Therefore, both and x’are read as “NOT x.” The truthtable for NOT is shown in Table.
boolean algebra and digital logic6
  • We now understand that Boolean algebra deals with binary variables and logicaloperations on those variables. Combining these two concepts, we can examineBoolean expressions composed of Boolean variables and multiple logicoperators. For example, the Boolean function:
boolean algebra and digital logic8
  • Boolean expressions can also besimplified, but we need new identities, or laws, that apply to Boolean algebrainsteadof regularalgebra.
  • These identities, which apply to single Boolean variablesas well as Boolean expressions, are listed in Table.
boolean algebra and digital logic10

Simplification of BooleanExpressions

  • EXAMPLE Suppose we have the function F(x,y) = xy+ xy. Using the ORform of the Idempotent Law and treating the expression xyas a Boolean variable,we simplify the original expression to xy. Therefore, F(x,y) = xy+ xy= xy.
boolean algebra and digital logic11
  • EXAMPLE Given the function , we simplify asfollows:
boolean algebra and digital logic13


  • The actual physical components, or digital circuits, such as those that performarithmetic operations or make choices in a computer, are constructed from a numberof primitive elements called gates.
  • Gates implement each of the basic logicfunctions we have discussed. These gates are the basic building blocks for digitaldesign. Formally, a gate is a small, electronic device that computes various functions of two-valuedsignals.
boolean algebra and digital logic14
  • We initially examine the three simplest gates. These correspond to the logicaloperators AND, OR, and NOT. We have discussed the functional behaviorofeach of these Boolean operators. Figure depicts the graphical representationof the gate that corresponds to each operator.
boolean algebra and digital logic15
  • Another common gate is the exclusive-OR (XOR) gate, represented by theBoolean expression: x ⊕y.
boolean algebra and digital logic16
  • Two other common gates are NAND and NOR, which produce complementaryoutput to AND and OR, respectively. Each gate has two different logic symbolsthat can be used for gate representation.
boolean algebra and digital logic19


  • In examples, all gates have accepted only two inputs. Gates are notlimited to two input values. There are many variation.
boolean algebra and digital logic20
  • Upon opening a computer and looking inside, one would realize that there is a lotto know about all of the digital components that make up the system.
  • Everycomputeris built using collections of gates.
  • These collections of gates are often quite standard,resulting in a set of building blocks that can be used to build the entire computersystem.
boolean algebra and digital logic21

Digital Circuits and Their Relationship to Boolean Algebra

  • What is the connection between Boolean functions and digital circuits?
  • Wehaveseen that a simple Boolean operation (such as AND or OR) can be represented by a simplelogicgate.
  • More complex Boolean expressions can be represented ascombinations of AND, OR, and NOT gates, resulting in a logic diagram thatdescribestheentireexpression.
  • We can build logic diagrams (which in turn lead to digital circuits) for anyBooleanexpression.
boolean algebra and digital logic22
  • Boolean algebra allows us to analyze and design digital circuits. Because ofthe relationship between Boolean algebra and logic diagrams, we simplify our circuitby simplifying our Boolean expression.
boolean algebra and digital logic23


  • Typically, gates are not sold individually; they are sold in units called integratedcircuits (ICs). A chip (a small silicon semiconductor crystal) is a smallelectronic device consisting of the necessary electronic components (transistors,resistors, and capacitors) to implement various gates.


  • Digital logic chips are combined to give us useful circuits. These logic circuitscan be categorized as either combinational logic or sequential logic.
boolean algebra and digital logic24

Examples of Typical Combinational Circuits

  • Let’s begin with a very simple combinational circuit called a half-adder. Considerthe problem of adding two binary digits together. There are only three thingsto remember: 0 + 0 = 0, 0 + 1 = 1 + 0 = 1, and 1 + 1 = 10.
  • Weneed to specify two outputs, not just one, because we have a sum and a carry toaddress. The truth table for a half-adder is shown in Table.
  • A closer look reveals that Sum is actually an XOR. The Carry output isequivalent to that of an AND gate. We can combine an XOR gate and an ANDgate, resulting in the logic diagram for a half-adder shown in Figure
boolean algebra and digital logic27


  • When a computer is given an address, it must first determine which chip touse; then it must find the actual address on that specific chip.
  • Forexampleif3 high-order bits are actually usedas the inputs to a decoder so the computer can determine which chip to activateforreadingorwriting.
  • the first 3 bits are 000, chip 0 should be activated. If thefirst 3 bits are 111, chip 7 should be activated.
boolean algebra and digital logic29


boolean algebra and digital logic30
  • An essential component of every computer is its memory. Without memorythere could be no computers as we now know them.
  • Memory is used for storingboth instructions to be executed and data.