You are on page 1of 20
MODULE 1 Computer Architecture & Organization Computer Architecture refers to the structure of all or part of a computer system and the details needed to make it functional. This takes into consideration the design of system software, such as the operating. system, as well as the combination of hardware and basic software that links the machines on a computer network Computer architecture therefore covers computer systems, microprocessors, circuits, and system programs. A computer system is comprised of two main components: 1. Hardware - this refers to the equipment required for the functioning of the computer system. It entails any component that can be physically handled. 2. Software — this refers to the set of instructions required to manipulate data in a computer system. Software governs the way hardware is used. Without software, hardware would be useless Page| 1 - Computer System Input/Output Devices An Input Device is a piece of hardware capable of only providing information to a computer. Examples of input devices are keyboard, mouse, joystick and scanner. An Output Device is a piece of hardware capable of only receiving information from a computer. Examples include printer, monitor and speakers. An Input/Output Device is one which is capable of providing information to a computer and also receiving information from it. One example of an input/output device is a disk drive. Port Connectivity refers to a location on a computer system for passing data into and out of a system, such as a USB port for connecting peripheral devices, eg printers. Speed refers to the rate at which information is transferred between a computer's CPU and an input or output device. Quality of Output refers to the extent to which a particular aspect of the output of an output device meets the standards of a particular time period. Example, what was considered good quality Page | 3 resolution on a monitor ten years ago will be different than what is considered good quality output today, Specialized Devices are input or output devices with additional features not pertaining to their main. function, example, a printer that can fax Memory Types Computer Memory refers to a hardware device that stores data for use by a computer. These devices may be capable of storing the data temporarily or permanently and are therefore grouped as such 1. Temporarily. These devices store the data up until the electricity supply to them is cut, after which, the data is lost. This is known as being volatile. Random Access Memory (RAM) is volatile: RAM is referred to as main memory as it is the primary memory used by the CPU when processing information. The contents of RAM can be altered, that is, data can be read from it or old data can be erased to make room for new data, 2, Permanently. These devices store data even after power to them is cut. Read Only Memory (ROM) is non-volat ROM chips contain information which cannot be modified or deleted. Information can only be read. ROM is used to store items that the computer needs to execute when it is first turned on. Aset of instructions called the basic- Page | 5 [i input-output-system (BIOS) which is needed to start up the operating system is stored in ROM. Erasable Programmable Read Only Memory (EPROM) is also non-volatile. It is used by hardware vendors to put variable or constantly changing code into a prototype system. EPROM is similar to ROM but is however able to have its contents changed. This is done by removing the EPROM chip from the computer, removing its protective covering and exposing the chip to ultraviolet light. This erases the chip's contents. Electrically Erasable Programmable Read Only Memory (EEPROM) is similar to EPROM, but instead of removing the EEPROM chip from the computer to erase its contents, an electrical pulse is passed through it Page | 6 I Celateda aumstl elke) Storage Devices There are certain attributes which can be used to differentiate one type of memory from another. These attributes include: 1. Speed — this refers to how fast data can be retrieved from or accessed on a device. The CPU is faster than cache which is faster than RAM which is faster than the hard disk which is faster than any secondary storage device such as a jump-drive. 2. Size — this refers to how many bits of data a memory device is capable of storing. A hard disk can store up to 1 T8; a jump drive can store up to 64 GB; a modern RAM chip can store up to 8 GB and a standard floppy disk can store up 101.44 MB. 3. Word Size — this describes the number of bits a word contains. A word is the number of bits a CPU can process in one instruction cycle. Modern processors can process up to 64 bits in one cycle. 4. Volatility — this refers to the loss of data when power to the memory device is cut. RAM is a volatile memory while hard disk is a non- volatile memory. Page | 7 Storage devices are hardware components which are used to deposit, retain or retrieve computer data. There are certain distinctive characteristics which can be used to compare one storage device to. another. These features include: 1. Storage Capacity — this refers to how much data a device can store. This is measured in bytes. Modern storage devices, such as jump drives, can store from 16B up to 64GB. 2. Access Speed - this refers to the time taken for a drive on the computer (hard drive, CD drive etc.) to find a particular piece of data on a storage medium and send it to main memory. It is usually measured in nanoseconds (ns) for main memory and seconds (ms) for secondary storage devices; main memory is faster than secondary storage 3. Access Method — this refers to how data is written or read from a particular place on a storage medium. There are three (3) access methods: 1, Sequential Access — in this scenario, a certain piece of datum can only be accessed by reading all the data that Page | 8 > m. come before it. Example, to access the 35" record, you have to read the 34 records that come before it. This is the slowest access method. Direct Access — this method allows you to access a particular piece of datum without first having to read all the data that comes before it. Example, if you wanted to access the 35 record, you wouldn’t have to go through the 34 before it. However, Itis usually necessary to scan some [but not f the data before the required one. The time it takes to access a piece of datum is somewhat dependent on the mechanism involved. Random Access - this method allows for a piece of datum to be accessed from anywhere on a storage medium without first having to read the preceding data The access time is independent of the mechanism involved and it is the fastest access method of the three. |. Portability ~ this refers to the ability of the storage device to be transported from one computer to another. Storage devices such as jump drives, SD cards and micro-SD cards possess the advantage of being extremely Page | 9 portable but due to their minute sizes, are susceptible to misplacement! Page | 10 Security devices are those hardware components set up to protect the computer system, the data stored on it and also the computer user. There are various security devices which computer users must have if they value their computer system and the data stored on it. 1. Surge Protector — this is a piece of equipment which is used to protect several connected devices from power surges and spikes. A power surge is an increase in voltage significantly above the stipulated level in the flow of electricity for 3 or more nanoseconds. A power spike is similar, but only lasts for 1 ~ 2 nanoseconds. High enough surges and spikes in voltage can cause severe damage to machines, Even if the increased voltage does not immediately destroy the machine, it may put excess strain on the sensitive components, causing them to deteriorate over time. A surge protector works by routing any excess current to ground. 2. Voltage Regulator — this is a device which is capable of automatically maintaining a constant voltage level in an electrical circuit. If the input voltage is too low or too high, it wil adjust the output voltage to be the stipulated Page | 12 voltage. If the input voltage is too high above the stipulated voltage however, some voltage regulators will prevent any further current from passing through, limit the amount of current passing through or just simply cease function. . Uninterruptable Power Supply (UPS) — thisis a piece of equipment which primarily protects a ‘computer system from data loss resulting from power cuts. UPS's work by running the computer system off power stored in its battery when there is a power cut. The UPS is always connected to the computer system, so when the main power is terminated, it quickly switches to its battery to supply power. UPS's also serve other functions. They serve as voltage regulators, as surge protectors and as frequency regulators. Page | 12 Types of Computers ‘A computer is a device which can accept, process and store data and produce some form of output. The size, computational power, speed, memory, and expected use of the computer however determines the type of the computer. There are five (5) general types of computers 1. Supercomputers — are computers which utilize the best technology available to perform as many mathematical calculations in the least possible time so as to solve extremely complex problems. Supercomputers, unlike other computers, are designed to devote all their resources to the solving of a single problem at a time. They have hundreds of processing units which are linked together in parallel to allow for multiple calculations to be performed simultaneously. Due to the large amount of heat generated by supercomputers, they have to be equipped with special cooling devices. These computers are extremely large and expensive, costing millions of US dollars. They are used in weather and climate forecasting, designing aircrafts and spacecrafts, designing new drugs and chemical compounds and in Page | 13 . Microcomputers — otherwise cal military weapons and defense systems research. Mainframes - are very large computers capable of supporting thousands of users simultaneously. These computers are similarto supercomputers in power but utilize this power to execute a vast amount of programs concomitantly. These are used in businesses and industries where multiple persons need to contemporaneously gain access to information located on a server. They are used in banks, colleges and supermarkets. d_personal computers (PCs), are relatively inexpensive computers designed for general use by a single person. They come equipped with a single silicon chip microprocessor which serves as the central processing unit. Microcomputers come in various sizes, ranging from relatively large desktop computers to smaller tablets. Microcomputers are used to perform more commonplace tasks such as word processing, accounting, desktop publishing, running spreadsheet and database management applications, playing games and surfing the internet. Page | 14 light-weight, portable personal comp\ hat have a flat display screen. They are as powerful as or even more powerful than PCs but have the advantage of being portable. They rely on rechargeable batteries to power them. 4, Laptops — are smi 5. Personal Digital Assistants (PDAs) — are small ion. PDAs are capable of taking notes, scheduling appointments, sending faxes and sending and receiving electronic mails. Most PDAs are capable of using pen-like devices to write on a screen rather than utilizing a keypad. When combined with a cellular phone, they have the capability of connecting to the internet and doing almost anything that a personal computer would be capable of doing. Due to their small size and limited battery life, they aren't a replacement for laptops. Page | 15. Computer Architecture Logic Gates & Truth Tables A Logic Gate is a minute digital switch which performs a logical operation on one or more logic inputs and produces a single logic output. Logic gates are used to construct microprocessors. The more logic gates that are packed onto a computer chip, the faster the computer can process data. Logic gates are represented by specific symbols depending on their specific function: * AND Gate Output is true only if both inputs are true A B Q=AB © ORGate Output is true if at least one input is true. A Q=A+B B * NOT Gate Output is the complement of the input. A Q=(A’) or Q= (A) Page | 16 * NAND Gate Output is only true if at least one of the inputs is false. A a 8 Q= (A.B) of Q= (A.B) + NOR Gate Output is true only if both of the inputs are false. A — Q = (A+B)’ or Q= (A+B) B © EX-OR Gate Output is true only if one of the inputs is true, Not both. 4 Q=(A.8'}+(A’.8) or B a=a@s © EX-NOR Gate Output is true if both inputs are the same (true-true or false-false). A Q=(A.8) +(A’.8') or ce a=(a@sy A Truth Table is a table used to specify the value of the output signal from a logic circuit/gate or device Page | 17 for every possible input. A truth table consists of columns for the inputs and a single column for the output. Truth tables for the logic gates are: * AND Gate Aen Ee - Ts [a [ole * NOT Gate Anon] . | o | 2 * NAND Gate ale +] | +] ofa) 1 ° 1 ° Page | 18 The CAPE Computer Science Examination may present the student with a truth table and ask for a logic circuit to be constructed. The truth table will not be for one of the primary logic gates. @ The following example shows how such a question should be approached. The following truth table represents a particular circuit: A eo] h} ol] KH] @ nh] a] 0] off ofofe} a ieee ‘© The first thing to dois to consider how each positive output would be arrived at if the false input is converted to a true input, that is, so that both inputs can be true and meet. the AND Gate condition. A 8 Q 1 1 0 1 0 0 0 1 1 | (a) 0 0 a et Page | 19 © Qwill be either condition 1 or condition 2, therefore construct 2 AND Gates and connect them to an OR Gate. — a © Place NOT Gates at appropriate positions on either input line to satisfy each condition; one condition should be dealt with on each AND Gate. Page | 20 ‘The CAPE Computer Science Examination may also present the student with a logic circuit and ask for a truth table to be drawn up. The following example shows how such a question should be approached. Draw the truth table for the following logic circuit ‘© Draw a truth table and put in the generic inputs. ofofel|a|> olslols la Page | 21 * Trace what happens to each value in a combination as it passes through each logic gate and write the final output in the corresponding Q cel ear aeece a | | Fa re o|s|o »| ole elo ole Blo * In condition 1, the first AND gate received ‘one high input and a low input which resulted from the NOT gate flipping the initial high input; the condition of the AND gate is not met and a low signal is produced. The second AND gate negated both high inputs, resulting in a low input being produced by it. Two low inputs being provided to the OR gate sees to a low output being produced. In condition 2, the first AND gate is provided with two high inputs as the NOT gate negated the low input of B. This is ‘enough to cause the output of the OR gate to be high. Can you figure out why conditions 2 and 3 produced 0 nd 1 respectively? Visit www.meelio2012.wix.com/comscil and share your answers with me. Page | 22 fare alee AFlip flop isa digital circuit with normally two input es, two output lines and a clocking device. A flip flop continuously checks its input signals and correspondingly changes its two output signals (one the normal value and the other the inverted variation/complement) at times specified by the clocking device Input 1: Output 1 (Q) Clocking Device Input 2 Output 2(@) A flip flop is used to store one bit of information. By connecting several flip flops, data representing a binary value may be stored. There are two general types of flip flops, synchronous and edge-triggered. ‘These categories are further broken down into other types: ‘© SR Flip Flops Set-Reset flip flops © TFlip Flops Toggle flip flops Page | 23 Data flip Registers are high speed memory locations within a microprocessor which store information temporarily. Registers have a particular storage capacity and usually serve one particular purpose. As registers are engineered to be faster than main memory (RAM), they are more expensive. Consequently, there are much fewer registers within a CPU than there are RAM chips. ps © JK Flip Flops Registers are constructed from flip flops. Registers are normally rated by the number of bits that they can store, for example an 8-bit register versus a 32- bit register. Processors often contain several kinds of registers, which are classified according to the information that operate on them: 1. Accumulator - this stores a previously calculated value or a value loaded from main memory. Instruction Register - this stores the instruction which is currently being executed or decoded, Memory Address Register (MAR) — this stores the memory address of the data that is to be fetched for processing or the memory address Page | 24 Page | 25 to which the results of processing will be sent to. input ‘ough from hen the counter reached 11112, 10 00002. Page | 26 Page | 27 Multiplexors A Multiplexor is a digital device which selects between a set of input signals and produces a single output signal on an output line. An electronic plexor enables several signals to share one device instead of having a single device for each input signal. Multiplexors are used in some CCTVs, where there are several CCTV cameras and only one CCTV monitor; the viewer simply choses which camera's feed he'd like to see on the monitor. 4X1 multiplexor has 4 input signals and 1 output signal. It also has 2 select inputs which determine whether the device is active or inactive The m llowing block diagram represents a 4 X 1 jexor: eye IMs 908 > Page | 28 The following is a logic circuit of a 4X 1 multiplexor: Sia S12 The following is the truth table for a 4 X 1 multiplexor: Inputs Select inputs | Output Q T lel ele eo} a] e|> The select inputs are responsible for which input (A, 8, Cor D)is provided to the output gate. Page | 29 Encoders & Decoders ‘An Encoder isa digital circuit which changes a set of signals into a binary code. An encoder has 2" input signals and n output signals. Only one of the input signals can be logic 1; all others must be zero. Output lines produce the binary code equivalent to the active input. The following is a block diagram of an 8 X 3 encoder: a 8x3 ints ro 7m™o0@> This particular encoder is called an octal to binary encoder. In this encoder, each of the eight inputs. corresponds to an octal digit and the three outputs produce the corresponding binary number. Page | 30 = = = La Le La The following logic cir encoder: it it represents an 8 X 3 D> 14+16+18 Q= 13+ I4+17+18. Qs=I5+ I6+17+18 Page | 31 The following is the truth table to the 8 X 3 encoder: Outputs | Pecinal CL o;o o;o 0 o;1 a 1/0 2 rj)1 3 o;o 4 o;}1 5 | 1/0 6 eh U Page | 32 A Decoder is a digital circuit which decodes an input code, that is, it takes m inputs and produces 2” Outputs. A decoder has n input lines, 2” output lines and an enable signal. The enable signal responsible for making the decoder active or inactive enable signal is zero, then all the decoder’s output will be zero, regardless of input signals ignal is one, then the decoder The following is a block diagram of a2 X 4 decoder: eo aersg Pe PRP ENABLE The following logic circuit represents a 2 X 4 decoder without enable: Page | 34 Data Representation Bits & Bytes Abit (binary di smallest unit of information jat is able to be stored in an el is used to represent the state of a transistor in a flip flop circuit, that is whether electricity is passing 1 is used to represent a transistor with electricity passing though it; it may also be called on, true or yes. Ois used to represent a transistor without electricity, passing through it; it may also be referred to as off, false or no. A byte is a group of eight bits. A byte can store values ranging from 000000002 — 11111111) ... that is, 0-255 in decimal Bytes are combined into groups of 1 ~ 8 bytes to form words. Modern technology allows for 32 and even 64 bits to be processed together. A 64-bit processor uses words that are up to 8 bytes long (54- bits) Page | 35 To represent decimal numbers in signed mag 1's complement or 2’s complement, one mus' know how to convert them to binary and vice versa. To convert from decimal to binary: 1. Draw up three columns and place the decimal number in the top center cell 2. Placea2 in the topmost left cell; this will be the number used to divide the decimal number to arrive at the binary equivalent. Page | 36

You might also like