KEMBAR78
COS 243 Lecture Note 1 | PDF
0% found this document useful (0 votes)
47 views46 pages

COS 243 Lecture Note 1

The document outlines the course COS 243 on Computer Architecture & Organization, covering topics such as physical considerations in computer design, data representation, and number systems. It details the importance of binary representation in digital computers, including fixed and floating-point systems, and discusses various data types and their representations. Additionally, it highlights the IEEE standard for floating-point representation and the significance of data organization for efficient processing.

Uploaded by

samdori1977
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
47 views46 pages

COS 243 Lecture Note 1

The document outlines the course COS 243 on Computer Architecture & Organization, covering topics such as physical considerations in computer design, data representation, and number systems. It details the importance of binary representation in digital computers, including fixed and floating-point systems, and discusses various data types and their representations. Additionally, it highlights the IEEE standard for floating-point representation and the significance of data organization for efficient processing.

Uploaded by

samdori1977
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 46
COS 243 Computer Architecture & Organization I G. B, Okereke (Ph.D.) Computer Science Department, U.N.N. Course Outline ‘ Physical consideration, Data representation and number bases, Fixed and floating point systems, Memory system representation, organization and architecture Physical Considerations of ‘Computer Architecture There are some important physical considerations when designing a ‘The very first step is to determine why the computer system is neede f user. Here go through the process of prioritizing what is most important to least important computer system. .d and what matters most to the tas follows: + Processing power (core speed, number of cores); . i + determining the working set of the processing and, which sets requires the minimum memory size for efficient processing; ‘+ amount of secondary storage needed; + graphics processing requirements; + power consumption; i + reliability (e.g. do we need error correcting memory, how close to the limits do we drive the system, do we need redundancy, normal or extreme operating environment, €..¢), + form factor: space and weight considerations, portability + what operating system will be running and other software requirements; + Financial budget; au + Do ve have time and resources to build the computer ourselves or do we outsource it (i.e, should we buy, pre-built, pre burnt in systems); Warranty (offsite) or onsite support? what downtime can we handle? + How knowledgeable are we? Do we know enough to make the right dec hhave enough time to research the options? + Future expandability (which is less and less a consideration nowadays because a 3+ year old motherboard is generally unable to use the latest CPUs and provide the interfaces for the optimal use of new memory and graphics cards e..c, and the power changes usually require a new power supply ect.c ec) Having worked out what we want, and our priorities, we then start planning your system, adjusting our choices when there are conflicting goals till we have a plan that best suites the priority order we have set, or we have to change our goals and restart again, ions? Do we DATA REPRESENTATION IN A COMPUTER 1. Introduction Data in a computer system is represented in binary format, as a sequence of Os and 1s, denoting ‘off and ‘on’ states respectively. The smallest component of this binary representation is known as bit, which stands for ‘binary digit’ A byte, on the other han Benerally enoompasses 8 bits, {Computer ar lasted neeonting to funetlonaliy,physeal lve and purpone, + Punetionality, Computers could be analogs digital or hybrid, Di i a eonilee east data that isin discrete form whereas analog computers process data | a lands wid nature, Hybrid computers on the other hand can process data that is both discret continuous, ‘i eotrical pulnes + Indigital computers, the user input is first converted and transmitted as elec fal p that ean be represented by two unique states ON and OFF, The ON state onl Tepresented by a “1” and the off state by a “O.The sequence of ON’S and the electrical signals that the computer can understand, \ e i Jdenly drops * A digital signal rises suddenly to a peak voltage of +1 for some time then bcarihe ~L evel on the other. An analog signal rises to +1 and then drops to 1 ina version, * Although the two graphs look different in their appearance, notice that they Sees said themselves at equal time intervals. Electrical signals or waveforms of this re to be periodic. Generally, a periodic wave representing a signal can be describe: the following parameters: + Amplitude(A) + Frequency(f) * periodic time(T) + Amplitude (A); this is the maximum displacement that the waveform of an electric signal can attain, ; i + Frequency (f): is the number of cycles made by a signal in one second. It is measured in hertz. Ihert is equivalent to 1 eycle/second, s i + Periodic time (I): the time taken by a signal to complete one cycle is called periodic time, Periodic time is given by the formula T=1/f, where fis the frequency of the wave. ‘When a digital signal is to be sent over analog telephone lines e.g, e-mail, it has to be converted to analog signal. This is done by connecting a device called a modem to the digital computer. This process of converting a digital signal to an analog signal is known as modulation, On the receiving end, the incoming analog signal is converted back to digital form in a process known as demodulation. 2. Concepts of Data Representation in Digital Computers + Data and instructions cannot be entered and pata Representation 1 Digital Cireuits | Pleetronie components, stich as microprocessor, are made up of millions of el einouits. The availability of high voltage (on) in these circuits is interpreted as "1" while a Jow voltage (off) is interpreted as ‘0°. This concept can be compared to switching on and ‘off an electric cireuit, When the switch is closed the high voltage in the circuit causes the dull to light ("1’ state). On the other hand when the switch is open, the bulb goes off ("0° state), This forms a basis for describing’data representation in digital computers using the binary number system. onic Data Representation on Magnetic Media + The laser beam reflected from the land is interpreted, as 1. The laser entering the pot is not reflected. This is interpreted as 0.The reflected pattern of light from the rotating disk falls ‘on a receiving photoelectric detector that transforms the patterns into digital form. The presence of a magnetic field in one direction on magnetic media is interpreted as 1; while the field in the opposite direction is interpreted as “O”. Magnetic technology is mostly used on storage devices that are coated with special magnetic materials such as iron oxide, Data is written on the media by arranging the magnetic dipoles of some iron oxide particles to face in the same direction and some others in the opposite direction Data Representation on Optical Media In optical devices, the presence of light is interpreted as ‘1’ while its absence is interpreted as “0' Optical devices use this technology to read or store data, Take example of a CD-ROM, if the shiny surface is placed under a powerful microscope, the surface is observed to have very tiny holes called pits. The areas that do not have pits are called land. Reason for use the of Binary System in Computers + Ithas proved difficult to develop devices that can understand natural language directly due to the complexity of natural languages, However, it is easier to construct electric circuits based on the binary or ON and OFF logic. All forms binary system format. Other reasons for the use of binat reliable, of data can be represented in ry are that digital devices are more small and use less energy as compared to analog devices, Bits, Bytes, Nibble and Word + The terms bits, bytes, and data size, + Bits: can be defined as either a binary, which can be 0, or Lilt i nee information ia digital computers, , oF L.lt is the basic unit of data or nibble and word are used widely in reference to computer memory i the considered as Byte: a group of bits (8 bits) used to represent a character, A byte is basic unit of measuring memory size in computer, ori Anibble: is half ‘a byte, which is usually a grouping 01 Is. ngth is use have a fength of as the meastire of Word: two or more bytes make a word, The term word i 16 bits, the number of bits in each word, For example, a word can bits, 64 bits ete, Types of data representation ° ° Symbolic Representation using Coding Schemes types ed {also complex Computers not only process numbers, letters and special symbols bv ase rake alot of of data such as sound and pictures. However, there oie typ ; memory and processor time when coded in binary form. ing long streams o} This limitation necessitates the need to develop better ways of handling ; Hey disits, binary digits i be i i streams 0 Higher number systems are used in computing to reduce eee aie enor into manageable form. This helps to improve the processi usage, Number Systems and their Representation A number system is a set of symbols used to represent values derived from a common base or radix. re ; As far as computers are concemed, number systems can be classified into two major categories: decimal number system binary number system octal number system hexadecimal number system oded Decininl, an enhanced fornab ry 1006003 Fixed Point and Floating Point Number Representations Digital Computers use Binary number system to represent all types of information inside the Computers. Alphanumeric characters are represented using binary bits (.e., 0 and 1). Digital representations are easier to design, storage is easy, accuracy and precision are greater, ‘There are various types of number representation techniques for digital number representation, for octal number system, decimal number system, and hexadecimal example: Binary number system, “presenting numbers number system etc. But Binary number system is most relevant and popular for re in digital computer system, Storing Real Number These are structured as following: [integer ] Unsigned integer eraiaiae signed integer [Sign _Integer. [integer [Fraction Unsigned fixed point [Sign[integer [Fraction Exponent] Sign | Mantissa Signed fixed point Floating point [Sign Sign] Size Digits Variable length Numerator} Denominator Unsigned rational Signed rational [Sign Numerator] Denominator ‘There are two major approaches to store real numbers (i.e., numbers with fractional component) in modern computing. These are (i) Fixed Point Notation and i) Floating Point Notation. In fixed point notation, there are a fixed number of digits after the decimal point, whereas floating point number allows for a varying number of digits after the decimal point, Fixed-Point Representation Unsigned fixed point Integer | Fraction Signed fixed point [Sign Integer [Fraction We can represent these numbers using: + Signed representation: ran; | i Tange from -(2-1) to (200). i : us complement Tepresentation: range from om) a on Pe S complementation representation: Tange from -(21)) tg (om a i na ~1), for k bits, 2's complementation representation is prefer seid ferréd in computer o r and ease for avithmetic operation, puter system because of unambiguous property Example Assuming a number is usip "8 32-bit format, which reserves 1 bit for the sign, 15 bits fort incerta 16 bi forte ma h reserves I bit for the sign, 15 bits for the nal pat, Theny 13.625 is represented as following: 1 _| vosc000070101% | ToT00000oR00000 Sion Integer part Fractional part Where, 0 is used to represent + and 1 is used to represent. 000000000101011 is 15 bit binary value for decimal 43 and 1010000000000 is 16 bit binary value for fractional 0.625, The advantage of using a fixed-point representation is performance and disadvantage is relatively limited range of values that they can represent, So, it is usually inadequate for numerical analysis as it does not allow enough numbers and accuracy, A number whose representation exceeds 32 bits would have to be stored inexactly. Smallest 0 | 000000000000000 [ 0000000000000001 Sign Integer part Fractional part bit Largest O | 4444441419991911 | 1140991141114 Sign Integer part Fractional part bit ‘These are above smallest positive number and largest positive number which can be store in 32-bit representation format, Therefore, the smallest positive number is 2" 0.000015 approximate and the largest positive number is (2'°-1)+(1-2"9)=2'5(1-2") =32768, and gap between these numbers is 2", We can move the radix point either left or right with the help of only integer field 1, Floating-Point Representation — sber of bits forthe integer part or the fractional part ber (called the mantissa or significand) and a This representation does not reserve a speeiffe nun place sits (called the exponent). Instead it reserves a certain number of bits for the num ah certain number of bits to say where within that number the decim igned fixed hus two part: the frst part represents a signed fi es the position of the decimal (or binary) ‘The floating number representation of a numb teger. Floating - point number called mantissa, ‘The second part of designat ee point and is called the exponent, The fixed point mantissa my be a point is abyays interpreted to represent a number in the following form: Mx. Only the mantissa m and the exponent e are physically represented in the register eat teste A floating-point binary number is represented in a similar manner except that it uses base = ‘exponent, A floating-point number is said to be normalized if the most significant digit of the mantissé isk. a Sign bit | _Expgnent Mantissa \ Biased form So, actual number is (-1)'(1-+m)x2°®"), where s is the sign bit, m is the mantissa, e is the exponent value, and Bias is the bias number. Note that signed integers and exponent ate represented by either sign representation, or one’s Complement representation, or two's complement representation, The floating point representation is more flexible. Any non-zero number can be represented in the ‘normalized form of +(1.bibabs...)2x2" This is normalized form of a number x. Example ~Suppose number is using 32-bit format: the 1 bit sign bit, 8 bits for signed exponent, and 23 bits for the fractional part. The leading bt | is not stored (as itis always'l for a normalized number) and is referred to as a “hidden bit’, Then ~53.5 is normalized as -53.5=(-110101.1)2=(-1.101011)x2° , which is represented as following below, 1 00000101 40101 100000000000000000 ow Exponent part Mantissa part ‘Where 00000101 is the 8-bit binary value of exponent value +5. Note that 8-bit exponent field is used to store integer exponents -126 < n $127. ‘The smallest normalized positive number that fits into 32 bits is (1 ,00000000000000000000000)2x2° fe number that fits into 32 bits is 12622°1%51.18x10%% , and largest normalized posit (ULLTU LTT LTT L LLL LTT 11)ax2!?7=(2*- 1x2!" & 3,40x 10% . These numbers are represented as following below, Smallest [0 7000010 —_[odG00000000000000000000 Sen Exponent part ——-Mantissa part Largest Q OMtiitt __—([Aeaaae aaa Sign Exponentpart_ —_-Manlissa part bit ‘The precision of floating-point format is the number of positions reserved for binary digits plus one (for the hidden bit). In the examples considered here the precision is 23+1=24, ‘The gap between 1 and the next normalized floating-point number is known as machine epsilon. the gap is (142)-1=27*for above example, but this is same as the smallest positive floating-point number because of non-uniform spacing unlike in the fixed-point scenario. Note that non-ferminating binary numbers can be represented in floating point representation, e.g., 1/3 = (0.010101 ..)2 eannot be a floating-point number as its binary representation is non-terminating. IEEE Floating point Number Representation — IEEE (Institute of Electrical and Electronics Engineers) has standardized Floating-Point Representation as following diagram. n Mantissa Sign bit Exponent (DiS), where s is the sign bit, m is the mantissa, ¢ is the exponent ~~ is (-1)*(1-+m)x2" halen 0 for positive number and 1 for negative number. ‘and Bias is the bias number. The sign bit plement representation. value, Exponents are represented by or two's com According to IEEE 754 standard, the floating-point number is represented in following ways: Half Precision (16 bit): 1 sign bit, 5 bit exponent, and 10 bit mantissa Single Precision (32 bit): 1 sign bit, 8 bit exponent, and 23 bit mantissa Double Precision (64 bit): 1 sign bit, 11 bit exponent, and 52 bit mantissa Quadruple Precision (128 bit): 1 sign bit, 15 bit exponent, and 112 bit mantissa Special Value Representation ‘There are some special values depended upon different values of the exponent and mantissa in the IBEE 754 standard. + All the exponent bits 0 with all mantissa bits 0 represents 0. If sign bit is 0, then +0, else - 0. + All the exponent bits 1 with all mantissa bits 0 represents infinity. If sign bit is 0, then +00, else -<0, + All the exponent bits 0 and mantissa bits non-zero represents denormalized number. + All the exponent bits 1 and mantissa bits non-zero represents error. Number Systems Easier ~ A number system is a way of counting things. It's a way of identifying the quantity of something. Harder - A number system is the set of symbols used to express quantities asthe basis for countin determining order, comparing amounts, performing caloulations and representing value Its the harsters and mathematical rules that are used to representa number. Examples include the Ava Babylonian, Chinese, Egyptian, Greeks Mayan, and Roman number systems, The ISBN and! Dea 5 tes. Social Security even has a number ‘There are infinite ways to represent a numb hi er. The nies computes and digital eletonis are: desinul, base noe assoeated with modem imal, binary, octal, and hexadecimal, 10 Decimal (base 10) is the way most human beings represent numbers, Decimal is sometimes abbreviated as dee, Decimal counting goes: 0, 1,2,3,4, 5, 6, 7, 8 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, and so on, Binary (base 2) is the natural way most digital circuits represent and manipulate numbers. Binary numbers are sometimes represented by preceding the value with ‘0b', as in Ob1011. Binary is sometimes abbreviated as bin, Binary counting goes: 0,11, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000, 10001, and so on. Octal (base 8) was previously a popular choice for representing digital circuit numbers in a form that is more compact than binary. Octal is sometimes abbreviated as oct. Octal counting goes: 0, 1,2, 3, 4,5, 6 75 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, and so on, Hexadecimal (base 16) is currently the most popular choice for representing digital circuit numbers in a form that is more compact than binary. Hexadecimal numbers are sometimes represented by preceding the value with ‘Ox’, as in 0x1B84. Hexadecimal is sometimes abbreviated as hex. Hexadecimal counting goes: 0,1,2,3,4, 5,6, 7, 8, 9, A,B,C, D, E, F, 10, 11, and soon. All four number systems are equally capable of represeriting any number. Furthermore, a number can be perfectly converted between the various number systems without any loss of numeric value. At first blush, it seems like using any number system other than human-centric decimal is complicated and unnecessary. However, since the job of electrical and software engineers is to work with digital circuits, engineers require number systems that can best transfer information between the human world and the digital circuit world. It turns out that the way in which a number is represented can make it easier for the engineer to perceive the meaning of the number as it applies to a digital circuit. In other words, the appropriate number system can actually make things less complicated. Fundamental Information Element of Digital Circuits Almost all modern digital circuits are based on two-state switches. The switches are either on or off. It doesn't matter if the switches are actually physical switches, vacuum tubes, relays, or a f PU igredge C . Von a cuttin transistors, And, it doesn't matter ifthe ‘on' state is repose Ha chip. Sore, “12 V on a RS-232 interface chip, or 5 V on a classic iol yee two states: te nary. Because the fundamental information element of digital ci a jt has two states: binary. hatutally represented by a number system where each individual digi Jane i i that are ‘0! in For example, switches that are ‘on are represented by '! and surtehesFtehes represented i (presented by ‘0’ It is easy to instantly comprehend the values o sh switch state in. binary, binary as 10001101. It is also easy to build a circuit to display eac! having an LED (lit or unlit) for each binary digit. Making Values More Compact s contracted to "bit". Not ary number, since jex, a more compact “Binary digit” is a little unwieldy to say over and over, so the ornet a bin only is the term "binary digit" a little unwieldy, but so is the len Tiere Sone! cach digit can only represent one switch, As digital circuits grew form of representing circuit information became necessary. i le : se 2). 8 is a who An octal number (base 8) can be up to 1/3 the length of a binary a Oe digit. Power of 2 (2°=8). That means three binary digits convert neatly into : -. 16 is a whole A hexadesimal number (base 16) can be upto 1/4 the length ofa binary Sea digit, Power of 2 (2=16). ‘That means four binary digits convert neatly into on Pe i imply chunk Unfortunately, decimal (base 10) is not a whole power of 2 So, itis not Le dea groups of binary digits to convert the raw state of a digital circuit into the hum: 2. Binary Number Conversion Binary to Octal An easy way to convert from binary to octal is to ‘group binary digits into sets of three, starting with the least significant (rightmost) digits, Binary: 11100101 = 11 100-101 11 100 101 Pad the ‘most significant digits With zeros if necessary to Complete a group of three, Then, look up each group in a table: 000) O01] O10) Onay 10 roy nT 12 / Binary = 011 100 101 Octal= 3 4 5§=345 oct Binary to Hexadecimal An equally easy way to convert from binary to hexadecimal is to group binary digits into sets of four, starting with the least significant (rightmost) digits. Binary: 11100101 = 11100101 ‘Then, look up each group ina table: }001 1fo100}0101) rigor 4 a 4 5 701ifi1 rroapiniojiny +d 48 4 Binary = 1110 0101 Hexadecimal= E 5=ES hex Binary to Decimal ‘They say there are only 10 people in this world: those that understand binary and those that don't. Haha. If you don't get that joke, you'll need a method to convert from binary to decimal. One method involves addition and multiplication. 1, Start the decimal result a 0. 2. Remove the most significant binary digit (leftmost) and add it to the result. 3. Ifall binary digits have been removed, you're done. Stop. 4. Otherwise, multiply the result by 2. 5. Gotostep2, Here is an example of converting 11100000000 binary to decimal: 13 Binary Digits Operation Decimal Result Operation Decimal Result Ti00000000 +1 I x2 2 Too000000 +1 3 x2 6 lloo000000 41 iz x2 4 Gooo0000 +0 14 x2 28 Doooo00 +0 28 x2 56 Bo0000 +0 56 x2 m2 ooo +40 12 x2 24 ooo 0 224 x2 448 foo 0 448 x2 896 +0 896 x2 1792 8 40 1792 done. 3. Decimal Number Conversion Decimal to Binary Here is an example of using repeated division to convert 1792 decimal to binary; Pesimal Number Operation Quotient Remainder ad 192, #2= gg a 1 396 aa i ie MB e2= my o tho 14 24 +2e Wa 0 (ooo a +e 56 0 Goooo 56 +28 28 0 Toooo0 2B +28 4 0 Qooov00 4 428 1 0 Yooo0000 7 +22 3 1 {leoo00000 300 428 1 1 {}100000000 1 +2= 0 1 ff1100000000 0 done, Decimal to Octal Here is an example of using repeated division to convert 1792 decimal to octal: 7 ‘ Octal Decimal Number Operation Quotient: Remainder pevie 1792+ B= 224 0 0 M4 +8= 28 0 to 28 +8= 3 4 foo 3 +85 0 3 400 0 done, Decimal to Hexadecimal Here is an example of using repeated division to convert 1792 decimal to hexadecimal: Decimal Number Operation Quotient Remainder Heaioee sul 17920 #16= 2 0 u 120 +16= 7 0 fo 7 +16= 0 a oo 0 done. from decimal to hexadecimal is that a table ‘The only addition to the algorithm when converting he desta 9. Ea Oe i neitalider i areal must be used to obtain the hexadecimal digit if the remainder is gr een qq) 9y 47 4 7 ieee o | 2 at 4 Sf Gg 7 Decimal: af tof i 12 13f 14) 15 Teeresmy | of Al Bl cl DE A imal converted to The addition of letters can make for funny hexadecimal values. For example, 48879 decimal hex is: Hexadecimal Decimal Number Operation Quotient: Remainder eit 488799 + 16= 3054 1s 5 30540 + 16= 190 14 EF 190 W 4 EEF No +16= 0 nN BEEF 0 done, Other fun hexadecimal numbers include: AD, BE, FAD, FADE, ADD, BED, BEE, BEAD, DEAF, FEE, ODD, BOD, DEAD, DEED, BABE, CAFE, COFFEE, FED, FEED, FACE, BAD, FOOD, and my initials DAC, 4, Octal Number Conversion Octal to Binary Converting from octal to binary is as easy as converting from bi to octal. Si fro . Simply | ‘ach oot digit to obtain the equivalent group of tree binary digit, ee 17 7 47 3-974 000) 001] O10} 14} T09) toa tao aaa 16 as ool ™ pinay 011 100 101 = 011100101 binary etal to Hexadecimal When converting from octal to hexadecimal, itis often easier to first convert the octal number Jno binary and then from binary into hexadecimal, For example, to convert 345 octal into her. (rom the previous example) Oul= 3 4 5 Binary = 011 100 101 = 011100101 binary Drop any leading zeros or pad with leading zeros to get groups of four binary digits (bits): Binary 011100101 = 1110 0101 Then, look up the groups in a table to convert to hexadecimal digits. (0000}0001f001 0}001 1foroo]o101for 10]01 1 7 7 3 4 9 6 7 700110101011] 09/1 104]t 1 oft 11} Binary= 11100101 Hexadecimal= E 5 =EShex Theirs, through a two-step conversion process, octal 345 equals binary 011100101 equals Octal to Decimal ‘Converting octal to decimal can be done with repeated division. 1, Start the decimal result at 0. 1 Hatt sigtratoben norton done Sap 5. |. Otherwise, multiply the result by 8, . Goto step 2, " vv al Result suit Oporation Decimal Rs Octal Digits Operation Dectmal Res = A Sas i 224 1 is “4 a ut : . 299 done. ng each tical way, by showing ead Th son ean also be performed inthe conventional mathematics! he conversion > digit place as an increasing power of 8. opi 345 octal = (3 * 82) +(4 81) +5 * 8) =G * 64) +(4*8)+6* 1) 5, Hexadecimal Number Conversion Hexadecimal to Binary ‘ i adecimal. Converting from hexadecimal to binary is as easy as converting from baht bn Sain Simply look up each hexadecimal digit to obtain the equivalent group inary j0001/0010}0011f0100}0103]o1 10}01 11] 100i}f0101014/1100)1103}1110}1 11) Hexadeciml= A 2 D E Binary= 1010 0010 1101 1110 = 1010001011011110 binary Hexadecimal to Octal When converting from hexadecimal to octal, it is often easier to first convert the hexadecimal mabe into binary and then from binary into octal. For example, to convert A2DE hex into octal: (irom the previous example) Hexadeciml= A 2 D E Binary = 1010 0010 1101 1110 = 1010001011011110 binary 18 auding eros or remove Jeading zeros to group into sets of three binary digits. ni! - 1010001011011110 = 1 010 001 O11 O11 110 in’ ren, look up cach group in tablet p00} O01] 010} O11) 100} 101} 110) 11 ayy yay 4 3 6 7 pinary = 001 010 001 O11 011 110 owl= 1 2 1 3 3 6=121336 octal ‘Therefore, through a two-step conversion process, hexadecimal A2DE equals binary 1010001011011110 equals octal 121336. Hexadecimal to Decimal Converting hexadecimal to decimal can be performed in the conventional mathematical way, by showing each digit place as an increasing power of 16. Of course, hexadecimal letter values need to be converted to decimal values before performing the math, Feeteann pesinels Foemeotntad Decimal; A2DE hexadecimal: (A) * 16) + (2 * 16%) + (D) * 16") + (E) * 16°) = (10 * 163) + (2 * 16%) + (13 * 16!) + (14 * 16°) 10 * 4096) + (2 * 256) + (13 * 16) + (14 * 1) 10960 +512 + 208 + 14 1694 decimal Binary Fractions First, remember what digits to the right of the decimal point mean in decimal: they're the "tenths" place, the "hundredths" pl 're the "halves" Dies i Phenets! pis and so on, In binary, they're the "halves" place, the "quarters" 19 fraction. We start ' fey yl e vert to a binary i ves us oO wits spose weve got umber ike $f tt. ev laces to divide by 8. That ae oY Ouro" binary forth O10, and ahs < c eights place: s0 da 1 in the cigh {Ewe think about that number, we've gota 1 in the halves place, an WeVe got 1/2 + 1/8, which is $/8, Converting fractions from/to binary rt abe ways to conver Naturally, just as fo integers, we've got more “algorithmically friendly ing a decimal fraction to binary. ‘umbers; especially for the important case of converting a decimal ae 4, binary to decimal Remember conversion of decimal integers to binary using division metho Using multiplication method. it i ion, and keep Fraction conversion is the other way around: wwe start with a decimal clon, multiplying by two. The result of each multiplication is one bit o i ting it ‘imal to Key point in converting decimal to binary: remember that in converting. ies Hoes ae i: binary, we worked by continually picking off the east iffcant bit by asking aay ‘odd, and then dividing the number by two to get the next bit. We'll work =e ny asking ifthe number is less than 1/2, and grabbing a 0 if it is ora 1 if it isn't Converting decimal fractions to binary A good way to organize the problem is to use a table, with columns old, bit, and new, We start with the number we're planning to convert inthe top row old entry. Now, we work across each row, and multiply the old entry by 2 to get a new value. Now we take {2 integer part ofthe new value and put iin the bit entry, and ut the fraction part in the new Sau. WE the mew entry is non-zero, we copy itinto the old entry in the neve row down and Continue (if it is 0, we're done), Here's an example: let's convert 375 from decimal to binary, old bit New Notes 3750 75 Multiply.375 by 2, et 0.75 75 1S Multiply.75 by 2, ger 15 $10 Metipty.5 by 2, ger 19 So the result is 011, 20 youwil Converting binary fractions (o decimal jou keep it up until you either have converted ihe number, or you've generated a bit string that is Yerpng as the space You have available to put the res & will have €0 quit carly, try converting 0, sult, To see an example of a number where ‘The result, in binary, repeats. Likewise, We can convert binary fractions to decimal by using a division method. We'll build a table putone Now, we go across each row, and add the old value to the new value. Then we copy the new value to the old value o: ke before; this time the columns are old, bit, and new. The top-row old value is 0, and we it in each row of the bits column with the least-significant bit first. bit value and divide by two to get the f the next row, and keep it up until we've filled in all the rows. The answer is in the bottom new value, Here's an example, using 0112. old bit (old + big/2 01 O51 75 150 375 So the result is 37510. Converting between bases that are a power of two As with integer conversions, from the right, we start from grouping from the radix point; another way but with fractions it's the trailing zeros th a. 1010100 b. 1010 cc. 110011 d. 101111 e. 10001 we can do this by converting groups of bits, But, instead of starting the left. A way to remember this is that in both cases we start is that with integers leading zeros are insignificant at are insignificant Exercise 1 Binary -> Decimal Decimal -> Binary hs io jg k.22 131 2 fit gtovodiy db Binary Arithmetic j imal numbers h ible on bi 1 a they are on decimal i i ions are possible on binary numbers just asthe penal au Nes pie gui similar in both systems, Multpleation fas aie aan es really etal unfaniliarty with the binary numbers causes enough diffic iio only adition and subtraction, which are quite easy, Addition Addition is almost as easy as "one and one is two". Indeed, there are only "zero and zery is zero", “one and zero is one", and "one and one is two": 0 0 1 1 4000 #1 +1 0 1 1 10 Notice that adding two single-digit *'5" Produces a two-digit result, whio to "cary" into the next place, just as with our familiar deci example, two plus four equals six: +h means that We have inal addition. Lets tke a simple Starting atthe tight column, ero plus zero , uals 2er0, one plus zero equals one, and zero plus one eauals one, Too easy; we didnt even have to Ph t carry. Let's try three Plus five equals eight: sowae down th i 2 Here is a final example to show, how to handle ae the one (into the 8's column). » eleven plus seven equals eighteen sarting atthe right, one plus one equals two: bring down the zero, carry the one; (2's column) one plus one equals two, plus one carried equals three ("11"): bring down the one, carry the one; iy column) zero plus one equals one, plus one carried equals two: bring down the zero, carry theone; (8's column) one plus zero equals one, plus one carried equals two: bring down the zero, carry the one (into the 16's column). Now try the following as exercises. Exercise 2 a 101 b 111 c 1010 +10 +10 +110 d 1010 e& 1010 f 1011 +1010 +1111 +101 g 11110 b.100110 i101110 +1110 a 4101 + 101 Binary Addition Consider the addition of decimal numbers: 23 +48 ‘We begin by adding 3+8=11. Since 11 is greater than 10, a one is put into the 10's column (carried), and a 1 is recorded in the one's column of the sum. Next, add {(2+4) +1} (the one is from the carry)=7, which is put in the 10's column of the sum. Thus, the answer is 71, Binary addition works on the same principle, but the numerals are different. Begin with one-bit binary addition: -- 9's +0 +1 +40 23 i 2. In binary, any digit higher thay ies us into the next column, In decimal form, 11 2 te denaal wuber 2 gan 1+1 carries us into the Jeft (as would 10 in decimal notation). 1 sale ay Puls us column to aoe (1#241)+(0*2"0), Record et in te a cs t in binary notation as aa foal notation, itn column get an anne f10" nour ee The process is the same for multiple-bit binary numbers: 1010 +n # Step one: Column 270: 0 Record the 1, Temporary Result: 1; Camry: 0 + Step two: Column 21: 1+1=10, Record the 0, carry the 1. Temporary Result: 01; Carry: 1 * Step three: Column 22: 140=1 Add | from: carry: 1+1=10, Record the 0, carry the 1. Temporary Result: 001; Carry: 1 © Step four: Column 243; 141=10, Record the 11. Final result; 1001 Add 1 from carry: 10+1=11, Alternately 11 (carry) 1010 +L T100T Always remember + 040-9 * N0e1 + H=10 Try a few examples of binary addit 4 yor WN ail HL ppinaty Multiplication sruilcation inthe binary system works the stme way asin the decimal system: e Ma + 10-0 © O*1=0 101 sal To 1010 ni Note that multiplying by two is extremely easy. To multiply by two, just add a 0 on the end. Binary Division Follow the same rules as in decimal di ion. For the sake of simplicity, throw away the remainder, For Example: 11101 1/11 10011 r 10 1111011 “al 101 “ll 101 i 10 1's Complement and 2's Complement Arithmetic 25 Vs Complement Arithmetic The Formula Fery_y Vis -Min I's complement notation, Fop 2 is a positive integet ‘ Where: n i the number of bits per word, is ae example with an 8-bit word and N’= 6, we have: N= (28-1)-6=255 -6=249 = 111110012 Tn Binary : ‘An altemate way to find the I's complement is to simply take the bt by bit complement of the binary 00000110, 2G, 5 111110012, Conversely, given the I's complement we can find the magnitude ofthe number by {aking its 1's complement, The largest number that can be represented in 8-bit 1's complement is 01111111) = 127 = $7F, The smallest is 100000002 =-127. Note tha the values 000000002 and 111111112 both represent zero, ‘umber. For example: N- Addition End-around Carry. When the addition of two values results in a carry, the carry bit is added to the sum in the rightmost position. There is no overflow as long asthe ‘magnitude of the result is not greater than 2's Complement Arithmetic The Formula Is per word, Vis a positive integer, 1V* is in 2's complement 6, we have: resample: = 46 = 000001103 yee 6 = HIN1O10s 1e magnitude of the number by taking its 2's onverselys given the 2's complement we ean find th ted in 8-bit 2s complement is ONNII1112~ 127. The ‘Somplement, The largest number that ean be represent Spallest iS 100000002 = -128, Addition When the addition of two values results in a carry, the carry bit is ignored. There is no overflow as long as the magnitude of the number is not greater than 2"-1 nor less than -2", Introduction to memory and memory units Inorder to save data and instructions, memory is required. Memory is divided into cells, and they are stored in the storage space present in the computer. Every cell has its unique location/address. Memory is very essential for a computer as this is the way it becomes somewhat more similar to a human brain. What is Memory? Memory is an array of registers that holds instructions and data for the CPU. Memory devices are digital systems that store data either temporarily or for a long term. Digital computer's hard disks have built-in memory devices that can store the data of users or manufacturers. The data can tither be in the form of control programs or programs that boot the system. Hence, to store such a huge amount of data the memory devices must have enormous capacity. The challenge isto build memory devices that have large capacities but are cost-effective, The memory devices must be capable of storing both permanent data and instantaneous data, Memories are made up of registers. Bach register in the memory is one storage location. The storage location is also called a memory location. Memory locations are identified using Address. ‘The total number of bits a memory can store is its capacity. A storage element is called a Cell. Each register is made up of a storage element in which one bit of data is stored. The data in a memory are stored and retrieved by the process called writing and reading respectively. 27 Address Address a fcoiea ba ee oO = 1 Basa 0/0 ‘eading 5 1{ 0] ojo ‘Writing, 2[ 41 0 data 3 data 3 4 3 5 6 m3 es eae ae teed ae Saas n-1 n-1 n n AlWrite operation B)Read Operation A word is a group of bits where a memory unt stores binary information, ie. a group of bit used {o store a single character. A word with a group of 8 bits is called a byte. A memory unit consists of data lines, address selection lines, and control lines that Specify the direction of transfer, The block diagram of a memory unit is shown below: keaddress lines Memory unit Read i: 2° word Writ : - tit per word 2B qypes of Computer Memory cache memory. This temporary storage area, known as a cache, is more readily available to the processor than the computer’s main memory source. It is also called CPU memory because it is iypically integrated directly into the CPU chip (LI cache) or placed on a separate chip with a bus interconnect with the CPU (L2 cache). RAM, It is one of the parts of the Main memory, also famously known as Read/Write Memory. Random Access memory is present on the motherboard and the computer’s data is temporarily stored in RAM. As the name says, RAM can help in both Read and write. DRAM (Dynamic RAM): D RAM uses capacitors and transistors and stores the data as a charge on the capacitors. They contain thousands of memory cells. It needs refreshing of charge on capacitor after a few milliseconds. This memory is slower than S RAM. S RAM (Static RAM): S RAM uses transistors and the circuits of this memory are capable of retaining their state as long as the power is applied. This memory consists of the number of flip flops with each flip flop storing 1 bit. It has less access time and hence, it is faster. ROM: ROM full form is Read Only Memory. ROM is a non-volatile memory and it is used to store important information which is used to operate the system. We can only read the programs and data stored on it and cannot modify of delete it. MROM (Masked ROM): Hard-wired devices with a pre-programmed collection of data or instructions were the first ROMs. Masked ROMs are a type of low-cost ROM that works in this way. PROM (Programmable Read Only Memory): This read-only memory is modifiable once by the user. The user purchases a blank PROM and uses a PROM program to put the required contents into the PROM. Its content cannot be erased once written. EPROM (Erasable Programmable Read Only Memory): EPROM is an extension to PROM where you can erase the content of ROM by exposing it to Ultraviolet rays for nearly 40 minutes. EEPROM (Electrically Erasable Programmable Read Only Memory): Here the written contents can be efased electrically. You can delete and reprogram EEPROM up to 10,000 times. Erasing and programming take very little time, i.e., nearly 4 -10 ms (milliseconds). Any area in an EEPROM can be wiped and programmed selectively. Virtual memory. A memory management technique where secondary memory can be used as if it were a part of the main memory. Virtual memory uses hardware and software to enable a computer to compensate for physical memory shortages by temporarily transferring data from RAM to disk storage. Units of Memory 29 ‘the commonly used Some of ‘ present data. Memory units are used to measure the size and eP Memory units are: it for data helq surement unit a 1. Bit is bit, The smallest measur td 1, abit can onl The firs ion in a computer is bit. the binary value: y liane ee devices is a bit. Out 0 ; on devices. re have one. The Bit is: sn primary memory and storag: ~ the smallest measurement unit for data in prim ~ represents binary values 0 and 1. 2. Nibble tmeans the group of 4 bits 3. Word rt, but the same for each Iisa Sxed numberof bits, its different from computer to compute as ord can be: : device. Compute store information inthe form of words..A Se eae toi ~ 4 fixed number of bits that varies across computers but remai . ~ used to store information in computers. 4. Byte . ae The ‘fundamental ‘unit used to measure data is the byte. It has 8 bits or 2 nibbles in it. A byte can therefore represent 26 or 256 values. They determine the sizeof files, documents, photos, and other kinds of data, : i ~ The fundamental unit for measuring data, consisting of 8 bits. : ~ Represents 256 values and determines file, document, photo, and data sizes, 5. Kilobyte 1024 bytes is equal to one kilobyte, Its widely used to denote small file sizes and data storage {becities. One kilobyte can hold a small image or around 1024 characters of text, It frequently 6. Meghabyte A megabyte is 1024 kilobytes in size, It containg more info kilobyte. A megabyte can hold longer texts, high-resolution in, di ale By cone * Comprising 1024 Kilobytes, * Contains more information compared to a kilobyt m fe. * Holds longer texts, high-resolution images, tne dt audio clips Measures file sizes of musio, short “ims software packages, and documents. 7. Gigabyte 30 ind megabytes is equal to one 94 Ira ‘uch full photo dha Rrasbyte, It has a substantial amount of data Storage space, jgabit, The storage capabjlitie high-definition movies, and software programs ean fit withing ai ces are routinely asesaéd ul tH hard driv , Solid-state drives, and other forms of data srdge + Equal to 1024 megabytes zing this technique. Offers substantial data ‘ as A storage spac «Suitable for larger files suet ik i fers ai programs. SS; such as full photo-albums, high-definition movies, and software $8. Terabyte A terabyte is i Lankan ie Hi of 1024 Gigabytes, It has a substantial amount of data storing capacity. A Sau lot of data in large databases, massive media collections, and enterprise-level ) - Itis frequently used by data centers, cloud storage services, and external hard drives with large storage capac ities. As the demand for large-scale data processing and storage grows, terabytes are becoming more and more important. + Comprising 1024 gigabytes, : + Provides substantial data storing capacity. + Holds large databases, media collections, and enterprise-level storage systems. 9, Petabyte A petabyte is a colossal unit of data storage capacity. A petabyte may hold massive amounts of data, including significant video libraries, sizable databases, and sizable collections of high- resolution pictures. It is often used in data centers, cloud storage, and scientific research that uses alot of data. + A colossal unit of data storage capacity. + Stores massive data quantities, like video libraries and large databases. 10. Exabyte (1024 petabytes) ‘An exabyte is equal to one EB. It has a substantial amount of data storage space. Exabytes can store vast film archives, massive data warehouses, and global internet traffic. It is extensively used in large-scale scientific simulations, cloud computing infrastructures, and enterprise-level storage systems. ‘+ Equal to 1024 petabytes. «Holds vast film archives, data warehouses, and global internet traffic. 11, Zettabyte (1024 exabytes) : A zettabyte represents a capacity for data storage that is almost unimaginable. Zettabytes have the capacity to store unfathomably large amounts of data, including worldwide internet content, long- term archival storage, and in-depth global data analysis, + Represents an almost unimaginable data storage capacity. ‘+ Stores worldwide internet content, long-term archival data, and extensive global analysis, 31 12. Yottabyte i 1024 2ettabytes make up a yottabyte (abbreviate Torage. Unimaginable amounts of data, such as i iiy bss the intemet numerous times or tracking vast amounts, Comprising 1024 zettabytes. 4 . Stands form facredbt ars of data storage. content numerous times. * Can hold vast amounts equivalent to storing internet incredible amount of da, for an incre 7 d YB). I a eine all of the material on the equival tored in yottabytes. Conversions of units 7 tes) | Name Equal To Size (In Bytes) | - | i | Bit 1 Bit 18 ; \ L a | Nibble 4 Bits 1/2 (rare) as aie - | Byte 8 Bits 1 | Kilobyte | 1024 Bytes 1024 | Megabyte | 1024 Kilobytes 1, 048, 576 | bevceagts Sn | Gigabyte | 1024 Megabytes 1,073, 741, 824 | Terabyte | 1024 Gigabytes 1, 099, 511, 627, 776 | Petabyte 1024 Terabytes 1, 125, 899, 906, 842, 624 | Exabyte 1024 Petabytes 1, 152, 921, 504, 606, 846, 976 Zettabyte | 1024 Exabytes 1, 180, 591, 620, 717, 411, 303, 424 | Yortabyte 1024 Zettabytes 1, 208, 925, 819, 614, 629, 174, 706, 176 Memory Organization in Computer Architecture The mem sg cganized inthe form of a ell, each cell able to be identified with a unique number called address, Each cel is able to ecognize control signals such as “read” and “write”, Benerated by CPU when it wants to read Ot write address. Whenever CPU executes the program 32 there is a need to transfer the instruction from the memory to CPU because the program is nerates the memory request. available in memory. To access the instruction CPU ge! Memory Request: i i ignals. For Example, When Memory request contains the address along with the control signals. For h inserting data into the stack, each block consumes memory (RAM) and the number of memory cells can be determined by the capacity of a memory chip. Example: Find the total number of cells in 64k"8 memory chip. ‘With the number of cells, the number of address lines required to enable one cell can be determined. Word Size: It is the maximum number of bits that a CPU can process at @ time and it depends upon the processor. Word size is a fixed size piece of data handled as a unit by the instruction set or the hardware of a processor. Word size=16-bit 16-bit processor foe. Byte=8-bit ___ Word size=22-bit 32-bit processor Byte=8-bit 64-bit processor Word size=64-bit Byte=8-bit f generation and the Present i cessor architectures because of gener iz s per the processor archi eet hata vari took, eadd alone dlcrigha Getic ra ints i seperti nla Wem bod reek of concepts like Regis, roeessor ean handle, Word size is Piet pln nbn, Flathng-polntmaabes r i Architecture i Access (DMA) Controller in Computer A i DHA Gia is a hardware device that allows 1/0 devices to directly es Memory wy; less participation of the processor, DMA controller needs the same old circuits of an interface 4, communicate with the CPU and Input/Output devices, hat is a DMA Controller? ; Dine semory Access uses hardware for accessing the memory, that hardware is alled a DMq Controller. It has the work of transferring the data between Input Output devi ices and main 8 Controller ig Block Diagram of DMA Controller Types of Direct Memory Access (DMA) ‘There are four popular types of DMA, * Single-Ended DMA * Dual-Ended DMA + Arbitrated-Ended DMA + Interleaved DMA Controllers can read and write from two memory is more advanced than single-ended DMA. Arbitrated-Ended DMA: Arbitrated. Ended DMA works by reading and writing to several MA. specify the desired location in memory. ZN contains the number of words io be aon Ster—It species the transfer mode, 34 yell registers in the DMA appear to the CPU as 1/0 interface registers. Therefore, the CPU batt read and Write into the DMA registers under program control via the data bus, vefigure below shows the block diagram of the DMA controller. The unit communicates with ecPU through the data bus and control lines, Through the use of the address bus and allowing DMA and RS register to select inputs, the register within the DMA is chosen by the CPU. pand WR are two-way inputs. When BG (bus grant) input is 0, the CPU can communicate hn DMA registers. When BG (bus grant) input 7 is 1, the CPU has relinquished the buses and )MA can communicate directly with the memory. bless Dabs Working Diagram of DMA Controller Explanation: The CPU initializes the DMA by sending the given information through the data bus. ‘The starting address of the memory block where the data is available (to read) or where data are to be stored (to write). + Italso sends word count ‘which is the number of words in the memory block to be read or written, + Control to define the mode of transfer such as re: + A control to begin the DMA transfer Modes of Data Transfer in DMA ‘There are 3 modes of data transfer in DMA that are described below.” re st Moder In Burst Mode, buses are handed over to the CPU by the DMA data is completely transferred, not before that. y if the whole «Gale Steting Mode: In Cycle Stating Mode, buses are handed over fo the CPU Cel ser the transfer ofeach byt. Continuous request for bus control is generated 2 A ad or write. Pete transfer Mode. It works more easly for higher-priority tasks. + Transparent Mode: ‘Transparent Mode in DMA does not require any bus i ; in the Fe rezate it works when the CPU is executing the transaction. a ie transfer of 8237 DMA Controller 35 Controller is a type of DMA Controller which has a flexible number of channels Se ae on 4 Input-Output channels, In these present channels, the channe] has 4 viyen te highest priority to be decided by the Priority Encoder, Each channel in the 8237 py, Gontelle has tobe programmed separately, 1A Controller : $257 DMA Conteler isa type of DMA Controle, hat vena single ntl 821210 dey, ired with it, becomes 4 channel DMA. Controller. In 8257 DMA Controller, the highest Priori al is acknowledged. It contains two 16-bit Tegisters, one is DMA Address Register ang th other one is Terminal Count Register, Advantages of DMA Controller + Data Memory Access speeds Up memory operations and data transfer. + CPU js not involved while transferring data, + DMA requires very few clock cycles while transferring data, + DMA distributes workload very appropriately, + DMA helps the CPU in decreasing its load, Disadvantages of DMA Controller + Direct Memory Access is a costly operation because of additional operations, + DMA suffers from Cache-Coherence Problems, + DMA Controller increases the overall cost of the system, * DMA Controller increases the complexity of the software, Memory Stack Organization in Computer Architecture A stackis a storage device in which the information ores Stored last is retrieved first. Basically, A ponders itm follows a memory stack organization, and here co will look at how it works, {5 going to be executed in the program, * Address Register (AR): This register points atthe collection of data and is used during the execute phase to read an operand, Stack Pointer (SP): 1t points atthe top ofthe stack and is used to push or pop the data items in or from the stack. As we can see in the figure, these three registers are Connected to @ common address bus and cither one of them can provide an address fer ‘memory. 36 Memory Stack Organization Stack Pointer is first going to point at the address 3001, and then the stack will grow with the decreasing addresses. Tt means that the first item is going to be stored at address 3001, the second item at address 3000, and the items can keep getting stored in the stack until it reaches the ast address 2000 where the ast item will be held. Here the data which is getting inserted into the Stack is obtained from the Data Register and the data retrieved from the Stack is also read by the Data Register. Now, let’s see the working of PUSH and POP operations in ‘Memory Stack Organization. PUSH ‘This operation is used to insert a new data item into the top of the Stack. The new item can be inserted as follows: SP —SP-1 M[SP]~ DR Inthe frst step, the Stack Pointer is decremented to point a the address where the data ite be stored. ‘Then By using the memory write operation, the data item from Data Register gets inserted into the top ofthe stack (at the address where the Stack Pointer is pointing). POP ‘This operation is used to delete a data item from the top of the Stack. Data item can be deleted as follows:- DREM[SP] SP-SP+1 sm will In the first step, the top data item is rea is then incremented to point at the n performed with the help of the followit * Access to memory with the help of + Updating the stack, It totally depends upon the organization of the stack wh¢ incrementing or decrementing the address values. aa In this case, the Stack Pointer grows by decreasing the mem« ina way that the Stack Pointer grows by increasing t Since the address is always available and automatically up‘ is Stack Pointer \ Register. The Ste er Stack into the oan ‘or Pop operations can be \ in the stack, Pu ad from th ext data item in th ing microoperation: If Stack Pointer (SP), and ether the Stack Pointer (SP) is updated by y address. The Stack may be made iso. he mor inthe Stack Pointer, the CPU can refer to the Memory Stack without having to specify an address. Clusters in Computer Organization : connected computers workin: A cluster is a set of loosely or tightly g together as a unified i i iter clusters have computing resource that can create the illusion of being one Zackie cone ia . rs have each node set to perform the same task, controlled and produced by Clustered Operating Systems work similarly to Parallel Operating Systems as they have many CPUs. Cluster systems are created when two or more computer systems = meee fly. they have an independent computer but have common storage and the systems work together. The components of clusters are usually connected using fast area networks, with each node running its own instance of an operating system. In most circumstances, all the nodes use the same hardware and the same operating system, although in some setups different hardware or different operating systems can be used in some setups. In the field of computer organization, a cluster refers to a set of interconnected computers or servers that collaborate to provide a unified computing resource. Clustering is an effective method to ensure high availability, s Clusters can be categorized into two balancing clusters. High-availability when one ot more nodes fail. Mult that in case of failure, scalability, and fault tolerance in computer systems. major types, namely high-availability clusters and load- clusters guarantee uninterrupted service provision even iple nodes are configured to provide redundant services, $0 another node takes over the failed node’s services without any interruption to the user. On the other hand, load-balancing clusters distribute workloads among nodes in the cluster to ensure that no single node is overburdened. Several hardware and software technologies can be used to implement clusters, including dedicated clustering hardware, virtw Clustering provides several benefits alization technologies, and distributed software frameworks, Such as high availability, scalability, fault tolerance, and load balancing, Nevertheless, there are a few challenges associated with clustering, such as complexity, cost, and management, 38 is Uhput Data For making cluster more efficient there exist two clusters: + Hardware Cluster + Software Cluster Hardware Cluster helps in enable high-performance disk sharing between systems, while the Software Cluster allows all systems to work together. computer? ‘computer’ computer3 ‘Types of Cluster Systems: pees, there are two types Of luster Systems: zimarily, 39 jred applications, run the requitet’ ‘ ve type of clustering, fl the 1, used for monitoring the server . Arrunidtie Gastar Hy ae od ‘The Hot standby "0+ and one node is in hot sta . * takes its place. til it fails, when it fails then it takes is a # + Symmetric Cluster: In this type of Cluster a other nodes at the same time, This clustering ‘cations and monitor applications a be run apr symmetric clustering as des all the node t than Asym re efficien it doesn’t have any hot standby key: oses from ar : rt different purposes TO" Caine nena ananged tgeter in such 22) ee eomputaonintensve sient fice st Computer Clusters ar aenged ten, ‘general-purpose business needs such as a i calculation. Basically, there are three types of Cs capability for balancing the load seeond Balancing Cluster ~A cluster equires an efesive a1 workload to enhance ang avilable computers In this, cluster nodes share @ COO tor scientific tho overall perfomance. For example-a high-performance 1°, corver cluster, ier lation would balance the load from different algorithms HOM! git cent node which may just use a round-robin method by assigning each a rea This type of cluster is used on farms of Web servers (web en coutesore hoa Fail Over Clusters ~ The function of switching applications and ofr eer pes are failed system to an alternative system in the cluster is es to - a oe 4 to cluster database of critical mission, mail, file, and application’ ; High .s “HA clusters”. They offer a high + High-Availability Clusters — These are also known as “H sbi ‘ll bein service. Ifa failure does occur, such as a system probability that all the resources will be in service. eee a goes dow ora disk volume is lost, then the queries in progress are lost. Any lost query, i fetried, will be serviced by a different computer in the cluster. This type of cluster is widely used in web, email, news, or FTP servers. Benefits: «Absolute scalability — It is possible to create large clusters that beats the power of even the largest standalone machines. A cluster can have dozens of multiprocessor machines, + Additional scalability — A cluster is configured in such a way that it is possible to add new systems to the cluster in small increments. Clusters have the ability to add systems horizontally. This means that more computers may be added to the clusters to improve their performance, redundancy, and fault tolerance(the ability for a system to continue working with malfunctioning of the node). High availability — As we know that each node in a cluster is a standalone computer, the failure of one node does not mean loss of service. A single node can be taken down for ‘maintenance, while the rest of the clusters takes on a load of that individual node. Preferable price/performance — Clusters are usually set up to improve performance and availability over single computers, while typically being much more cost-effective than single computers of comparable speed or availability, Features of clusters in computer organization: High Performance: Clusters are designed to provide high performance computing by utilizing the processing power of multiple computers working together, Scalability: Clusters are scalable, which means that they can easily accommodate new nodes or computers to increase processing power and performance. 40 cations, he server tor ng as gai fault-tolerant, which means that they i e: (ers are designed to B i i fru ae : Clusters ae ies fal This is aebfeved through redundant hardware, sone ‘one : ‘ srs use load balaneing techniques to distribute processing workload . manner. This helps ( maximize performance and prevent Fault Tolerance to operate even i or both. : Lond Bataneing: Clusters 0 across multiple nod 0 verloading of individual nodes. 4 ‘ in osametivty ‘Ciusters are interconnected through a high-speed network that allows for deient communication and data transfer between nodes. ‘Shared Resources: Clusters allow for shared access:to resources such as storage, memory, and jnput/output devices. This makes it easier to manage resources and reduces the need for duplication. e a Cost-Effective: Clusters can be cost-effective compared to traditional high-performance computing solutions. This is because they use commodity hardware and software, and can be built using open source technology. Versatility: Clusters can be used for a wide range of applications, including scientific computing, data analysis, and web serving. Advantages and Disadvantages When considering a particular topic, it is important to evaluate the potential advantages and ly, disadvantages. This approach provides a comprehensive understanding of the topic, helping, to make informed decisions. 2. Advantages refer to the benefits or positive aspects of a particular topic. For instance, when implementing a new technology, the advantages may include improved efficiency, cost savings, and increased productivity. These benefits can positively impact individuals or organizations, leading to increased profits, better customer service, or improved quality of life. 3. On the other hand, disadvantages refer to the potential drawbacks or negative aspects of a topic. When evaluating a new technology, for instance, the disadvantages may include higher costs, reduced privacy, or possible security breaches. These drawbacks may negatively impact individuals or organizations, leading to financial losses, negative customer experiences, or reputational damage. 4, It is important to weigh both the advantages and disadvantages of a particular topic before making a decision. This helps to ensure that the potential benefits outweigh the potential drawbacks. Additionally, it is essential to keep in mind that the advantages and disadvantages may differ depending on the individual or organization’s needs, goals, and circumstances. In summary, evaluating the advantages and disadvantages of a topic is a crucial step in decision- making, By considering both the positive and negative aspects of a particular topic, individuals or organizations can make informed decisions that align with their goals and values. Stack machine in Computer Organisation Last Updated : 19 Feb, 2020 41 ‘, he CPU Instruction format depending upon the ©". 1 f ts ‘fied into different types .d on internal storage: seumization, CPU epee oak ‘classified into three (PES Pe al register. In this Stack machine, Accumulator machine, General purpose orBanitt article, we will learn about the stack machine in computer © Stack Machine: Tn the stack machine, data is available atthe top of the ‘Source and destination, push and pop instructions.are used ; : cit addresses in the is top of the stack. In the stack machine, there is no need to pass ExP/E : instruction, Therefore the instruction format consists only ofthe OPCODE (Operation Code) field. This instruction format is known as Zero address instruction. items in the Stack. The two operations of the stack are insertion (push) and deletion (pop) of . However, nothing is pushed or popped in a computer stack. Bae — SON EE matsp zi ganizations. Default Stack First PUSH B and X in a stack, then to add ‘i first POP X th J data with name C, so the data present is stored in vailble CO Poe A PREC a2 Similarly o perform SUB (Y-C) first perform POP operttion POP as Z, See in figure below ‘ etter understanding: ———— aes POPX POPB ADD (B+X) foe % SUBIY-C) x Y 8 ox c Ye PUSHB pop ruse suB Popz PUSHX Here PuMY. Here ADD C=BK 26 Arithmetic instructions execution on stack machine Differences between Computer Architecture and Computer Organization Computer Architecture is a functional description of requirements and design implementation for the various parts of a computer. It deals with the functional behavior of computer systems. It comes before the computer organization while designing a computer. Computer architecture and computer organization are related but distinct concepts in the field of computer science. Computer architecture refers to the design of the intemal workings of @ computer system, including the CPU, memory, and other hardware components. It involves decisions about the organization of the hardware, such as the instruction set architecture, the data path design, and the control unit design. Computer architecture is concerned with optimizing the performance of ‘a computer system and ensuring that it can execute instructions quickly and efficiently. ization refers to the operational units and thei ther hand, computer organization e oper and their int seomeations that implement the architecture specification, It deals with how the ‘omponents of a computer system are arranged and how they interact to perform the required 43 implementation of the ith the physical implementation of t ith he phen and communication chy, and inpul/output systems, operations, Computer organization is concerned with teroont architecture design and includes decisions about the int a between components, such as the bus structure, memory architecture n of the internal workings of a ie ‘on of the internal workings of hn summary, computer architecture is focused on the design of computer organi imple ion of that . ization i the implementation of t Computer system, while computer organization is focused on Me nian design. Computer architecture is concerned with the Heb leve details. computer organization deals with the low-level implement Architecture describes what the computer does. Application Program) ‘Application Design | Gao oot Computer Architecture } Computer Design Logic Design Circuit Design Computer Component Computer system High Level Software Computer Hardware Organizatior Low Level Computer Organization comes after the decision of Computer Architecture first. Computer Organization is how operational attributes are linked together and contribute to realizing the architectural specification. Computer Organization deals with a structural relationship. The organization describes how it does it. Difference between Computer Architecture and Computer Organizatio1 on of the ecture uter nication Ne Computer Architecture puter Organization put systems. 7 »s what the ‘The Organization describes how it does it, Fine: Arvhiteoture deseribe: ‘ie computer does. while Computer Organization deals with a Computer Architecture deals with the structural relationship. functional behavior of computer 2 systems, In the above figure, it’s clear that it In the above figure, it’s also clear that it 3 deals with high-level design issues. deals with low-level design issues, ; i Whereas Organization indicates its 4, Architecture indicates its hardware. etnies The implementation of the architecture is AS a programmer, you can view architecture as a series of instructions, callscroriantaation 5. addressing modes, and registers. For designing a computer, its For designing a computer, an organization is architecture is fixed first. decided after its architecture, ‘Computer Organization is frequently called Computer Architecture is also called microarchitecture. a Instruction Set Architecture (ISA). Computer Architecture comprises. | ar : : logical functions such as instruction ~, ComPuter Organization consists of physical sets, registers, data types, and units like circuit designs peripherals, and addressing modes. | The different architectural categories found in our computer systems are as CPU orgsinization is classified into three follows: categories based on the number of address fields: 1, Von-Neumann Architecture 2. Harvard Architecture 1, Organization of a single Accumulator. 3. Instruction Set Architecture 2. Organization of general registers 4, Micro-architecture 3. Stack organization 9. 5, System Design 45 10. ML 12, 13, Computer Architecture Temakes the computer's hardware visible, Architecture coordinates the hardware nd software of the system. ‘The software developer is aware of it. Examples- Intel and AMD created the x86 processor. Sun Microsystems and others created the SPARC processor. Apple, IBM, and Motorola created the PowerPC. Computer Organization It offers details on how well the computer performs, Computer Organization handles the segments of the network in a system. Ttescapes the software programmer's detection. Organizational qualities include hardware elements that are invisible to the programmer, such as interfacing of computer and peripherals, memory technologies, and control signals. 46

You might also like