UNIT 1 – THE SYSTEM UNIT How Computer Processors Communicate Before discussing what a computer or an operating system is, let’s look at the type of numeration systems used to make notations in setting up operating systems, since it is impossible to avoid in this discussion. The basic memory cell is composed of a transistor that acts as a switch and a capacitor that holds an electrical charge. Thus, a cell can have only two possible states, that of being charged or discharged. Digital computers store information as electrical charges, all information must be broken down into “on” and “off” states. “0” represents a discharged memory cell (low voltage) and may be referred to in the following ways: 0 LO OFF FALSE NO LOW VOLTAGE 1 HI ON TRUE YES HIGH VOLTAGE Since the real world requires the expression of many values and ideas expressed in the alpha-numerics of human language, a method must be found to express these quantities using only two states. How do we get two numerals, “0” and “1” to express all necessary values? How do we create graphical images? How do we make comparisons like equalities, inequalities, greater and lesser states? How do we express characters of the alphabet, punctuation and special characters? How do we locate information in memory? How do we issue instructions to the computer? Using Binary Notation to Express Values other than “0” or “1” So, how do we express base 10 numbers and characters as “on” and “off”? First, we have assigned a standard number to each character. This universal system is called the ASCII Code system. Then we use place value. In our numeration system, a digit from “1” through “9” can represent different values according to position in the numeric string. Example: 9 = 9 units. 90 = 9 x 10 units. 900 = 9 x 100 units. This is because of place value. Place value is computed using the base, in this case 10 since we use 10 different symbols (0,1,2,3,4,5,6,7,8,9). Place value takes this base and raises it to consecutive powers from right to left. Example: 10 to the zero power (10/10) = 1. 10 to the first power (10) =10. 10 to the second power (10 x 10) = 100. 10 to the third power (10 x 10 x 10) = 1000, etc. Now let’s apply the same rules to base 2 (binary). We use two since we must express two states: “on” or “off” expressed as “1” or “0”. Thus, we have two different symbols. That’s why we call it base 2. Let’s do an 8-bit example using the following table. Using the base 10 ASCII values for the characters: “A”, “B”, and “C” which are 65, 66, 67 respectively. Powers of 2 > Base 10 Value > 65 66 67 27 128 0 0 0 26 64 1 1 1 25 32 0 0 0 24 16 0 0 0 23 8 0 0 0 22 4 0 0 0 21 2 0 1 1 Programming in Low-Level Programming Language Binary code can be used: To indicate a register or location in memory to store something. To express a numeric value. To express an alpha-numeric character code. To express a control character like a return or page break. To indicate the presence of a dot in a graphic; to express its intensity and color. To issue an instruction or op-code to a particular chipset. 20 1 1 0 1 Sorting Things Out If numeric values, ASCII character codes, Instructional Op-Codes and addresses are all binary codes, how does the processor and chipset tell which binary sequence in an instruction is a value, instruction, character code or address? The chipset is hard-wired to look for a specific sequence. This comprises the “grammar” and “Syntax” of the low-level chipset language. Just as each processor and chipset has a unique instruction set, they also have a specific sequence. In order for a chipset to be compatible, it must be designed to accept both the instruction set and its sequence. This is why Windows, designed for the Intel and compatible chips, cannot run on the Mac’s Motorola chip. The following are some examples of how things are done. Using Binary Bit-Mapping to Draw Graphics Using binary values, we can map any graphical character or alphanumeric font as seen below. We are using an 8 bit (1 byte) word length to keep things simple. A 32 bit word would yield a smoother graphic. Address 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 Base 10 120 36 36 56 32 32 32 112 Binary 01111000 00100100 00100100 00111000 00100000 00100000 00100000 01110000 27 26 25 24 23 22 21 20 Using Hexadecimal Notation to Simplify Notation Even though computers always use binary internally and seldom get confused, humans are highly prone to errors when long binary numbers are used. Imagine what a 16 or 32 bit notation would be to enter directly. Computer scientists often translate these into hexadecimal numbers (base 16), often referred to as “hex”. Using the same logarithmic mathematics which we have applies to both base 10 and base 2, let’s take a look at some hex expressions. Since base 16 needs 16 different single-digit symbols and our numeration systems has only 10 (0 to 9) we must invent additional symbols. In base 16 we count (0 to 15) as: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Powers of 16> Base 10 Value> 65 66 67 255 4000 65535 163 4096 0 0 0 0 0 F 162 256 0 0 0 0 F F 161 16 4 4 4 F A F 160 1 1 2 3 F 0 F Note: In order to avoid confusion with base 10 numbers, hex notations generally are written as follows: $ 0041 or & 0041 or x 0041 or 0041 h Expressing Equality, Inequality, Values Greater and Values Lesser Computers make decisions based upon evaluations. Things are either the same (equal) or different (unequal). If they are unequal, one thing is either greater or lesser. When comparing two values where X=5 and Y=6 mathematically, the following takes place. Expression X=Y X <> Y X>Y X<Y Condition False True False True Yield 0 1 0 1 Expressing Characters as Binary Values By standard, each character of the alphabet, punctuation mark, numeral and control character (unprintable characters used to control cursor position, lineation, etc.) is given a sequential 8 bit binary value called an ASCII Code. The following table gives a few examples. Character “ 0 1 2 = @ A B C a b c Function Null Line Feed Form Feed Return Punctuation Numeral Numeral Numeral Operator Character Character Character Character Character Character Character Binary Code 00000000 00001010 00001100 00001101 00010010 00110000 00110001 00110010 00110011 01000000 01000001 01000010 01000011 01100001 01100010 01100011 Hex Code $00 $0A $0C $0D $22 $30 $31 $32 $3D $40 $41 $42 $43 $61 $62 $63 Decimal Code 0 10 12 13 34 48 49 50 61 64 65 66 67 97 98 99 Instructing the Computer Using Binary Operational Codes (OPCODES) Just as each character is assigned a code, each chipset (Processor and motherboard chips) have unique binary codes for every action that can take place. These Low-level OPCODES instruct the processor to carry on computations and data processing. Each brand of processor has its own low-level instruction set. Locating Information Using Binary Addresses Random Access Memory (RAM) is a matrix of millions of transistor-capacitor units forming each bit cell of memory depending on the architecture of the memory and the required number of bits per word of data. For discussion, lets suppose we use 8 bits or one byte, since this is the minimum required length of ASCII and Op-Codes. Each byte would have a unique sequential binary address. The use a familiar metaphor, if the byte were your locker, the address would be the locker number. Your locker number allows you to locate your locker and its contents among all the lockers in the school. Likewise data and instructions are stored using blocks of addresses. Take another look at the bit-map table on the first page of this unit for an example. High-Level Languages Yes, programmers who design components need to code in binary sometimes. In reality, most use a language called “Assembly”. This language uses an abbreviated symbolic language to program. It is then translated into straight binary by another program. The programmer must still decide on actions, addresses and locations to be used and expresses quantities in hexadecimal. Careful attention must be taken to sequence of actions and the locations used to avoid destroying critical system instructions. Most programming is done in high-level coding using a language like C, C++ or C#, where English-like sentences and instructions are used to produce “source code” for each part of the program. A “compiler”, translator program “reads” this source code and changes it into binary code and a “linker” program patches the code of the different parts of the program into a continuous binary instruction set called an executable (.EXE) file. In programming for the Windows Operating System, this program must produce Dynamic Link Libraries (.DLL) files. Windows programming is a different technique, since most of the programming requires “calls” to already-existing instructions residing in the system itself. THE SYSTEM UNIT HARDWARE The Power Supply The system unit starts with a source of power. Power supplies convert line power 120 VAC 60 Hz. as used in the U.S., into the 3.5 VDC, 5.0 VDC and 12 VDC needed by the system components. This is accomplished through the use of step-down transformers, rectifiers, capacitors and voltage regulator circuits. In most cases, the power supply exhaust fan also removes heat from the system case. The ATX power supply communicates with the motherboard and disk drives to control temperature and power consumption. Software can report the state of the processor and speed of cooling fans. The Motherboard The main system board or “motherboard” supplies mechanical mounting and support circuitry for all of the system components: The clock chip, processor, ROM BIOS chip, CMOS chip, RAM, cache, bus connectors and some ports. The motherboard is designed around its clock, processor and BIOS as a total unit. System Clock The system clock chip is a precise oscillator circuit that provides a steady reference signal by which instructions are executed by the processor and by synchronous data moving from one component to another. It also provides a reference for the calendar clock. Read Only Memory (ROM) The ROM chip has permanently burned low-level instructions and data used by the system during “boot” or initial startup to identify its motherboard components until the operating system is loaded. These cannot be changed without changing the chip itself. This chip holds the Basic Input-Output System or BIOS instructions. CMOS Chip This chip is a low-power consumption memory chip. The chip contains the system configuration as entered by the user during the BIOS setup. Information as date and time, drives, memory configuration, port configuration and security is stored here. A battery provides this chip with power while the computer is turned off. This battery must be replaced occasionally. CMOS Chips are being replaced with flash memory, requiring no battery power. The Central Processor (CPU) The Central Processor (CPU) and Arithmetic Logic Unit (ALU) or Coprocessor Usually now built into one package, these comprise the “brain” of the computer. The processor chip, containing the transistor logic gates and pathways necessary for processing as well as an internal bus, cache and registers for temporary storage of data during computation and processing. Since the chip is large and runs hot, it usually can be seen with heat sink fins and a small fan. Random Access Memory (RAM) These chips, located on little circuit strips, plug into sockets on the motherboard. They are comprised of millions of tiny transistors and capacitors that hold binary information. This information may be data or instructional code. Since this memory is volatile (held for a fraction of a moment) it must be refreshed constantly and loses it when power is lost. Cache Cache is comprised of very high-speed memory chips on the motherboard. These chips are faster than RAM and more costly. However, they provide speed during processing by holding information that is needed over and over saving the processor from fetching it from RAM. Cache memory located on the motherboard is called external cache, while cache memory located within the processor chip is called internal cache. Bus The internal bus, contained within the processor chip, connects all its internal circuits together and terminates at the chip’s socket prongs. The external bus is located on the motherboard. A bus is a set of parallel connectors all attached to the same set of conductors. It serves as sort of an “electrical highway” over which signal travel. The main external bus has evolved from the 8 bit PC but to the 16 bit Industry Standard Architecture (ISA). A set of edge connectors that receive adapter circuit boards. Currently, the 32-bit Peripheral Component Interconnect (PCI) bus-mastered bus is the main support of most adapters. The bus connectors contain a standard pin-out to which all adapter boards must be made, whether ISA, PCI. These connections carry the 8 bit or 16 bit (ISA) or 32 bit (PCI) binary signals, a signal ground, a protective ground, handshaking lines, lines for required voltages to power the adapter, the strobe (clock) signal for synchronous data transmission and connections for Plug and Play (PnP) detection. Because transmission speeds are slower at the bus than the processor, the bus presents the greatest opportunity for data to “bottleneck” or slow up. The Small Computer System Interface (SCSI) also functions as an auxiliary bus, as are the Universal Serial Bus (USB), HighSpeed USB2 and Firewire (IEEE-1394). Ports A port is a point of connection between the computer and an external device. Ports are both physical and logical. Physical ports are the hardware actual connectors where devices are attached. Logical ports are entities by which the operating system addresses the devices. Each physical port has a corresponding logical port name (e.g. C0, COM1:) to which are attached the memory addresses and interrupts flag by which the operating system communicates. Logical ports can be used that have no corresponding physical ports. Ports may be internal or in the case or external on the outside of the case. Ports must be assigned their own base address, interrupt (IRQ) and sometimes a direct memory address (DMA). Ports may be internal (on the motherboard) or external (on the adapter board tab in back of the system unit). Internal ports Internal ports may be located on the motherboard itself or on an adapter board. They are usually header connectors that receive flat cables connecting to devices attached to the computer’s case. The 8 bit Floppy Disk (FDD) port; the Primary and Secondary EIDE and internal SCSI are examples. Other ports may also be available on the motherboard. SHORT NAME FDD LONG NAME USE LOCATION Floppy Disk Drive PCI Peripheral Component Interconnect Accelerated Graphics Port Floppy Disk Tape Drive Adapter Boards Graphics Board Hard Drives CD-ROM Drives Zip Drive Super Disk Motherboard Internal Motherboard Internal Motherboard Internal Motherboard Internal Hard Drives RAID Hard Drives Motherboard Internal AGP EIDE Enhanced Electronics ATA Advanced Technology Attachment SATA Serial Advanced Technology Attachment SCSI Integrated Drive Bus Port supporting up to 8 Various devices in a chain using a single Devices IRQ. SCSI Max Bus Max Cable Interfaces Transfer Width Length((met Rate (bits) ers) (MBps/s) SCSI-1 5 8 6 Fast SCSI 10 8 3 Fast/Wide SCSI 20 16 3 Ultra SCSI 20 8 1.5 Wide Ultra SCSI 40 16 1.5 Ultra2 SCSI 40 8 N/A Wide Ultra2 SCSI 80 16 N/A Ultra 160 SCSI 160 16 N/A Ultra320 SCSI 320 16 N/A PORT CONNECTOR Header (Male) Edge (Female) Edge (Female) Header (Male) 40 Pin Cable with Color-coded headers Four pin SATA cables. Motherboard Header (Male) Internal/Externa l Differenti Low Max # of al Voltage Devices 2 wires/ Dif. LVD bit 25 N/A 8 25 N/A 8 25 N/A 16 N/A N/A 8 25 N/A 8/(16diff) 25 12 8 25 12 16 N/A 12 16 N/A 12 16 External Ports External ports are available from the outside of the computer’s case. They are either mounted the case or to metal tabs in the accessory slots and fed by flat cables plugged into the motherboard. Other external ports are attached to the adapter boards in the computer’s bus connectors. External ports can be recognized by their unique connectors. We will discuss several of these ports and their functions. EXTEXERNAL PORT Keyboard Port PS/2 Mouse Port Video Display Signal Port Serial Port (RS-232-C) Parallel Printer Port Small System Computer Interface Port Universal Serial Bus Port High-Speed Universal Serial Bus Port Firewire Infra Red Link Port Game /MIDI Port Internal Modem Modular Phone Port (4 conductors) Personal Computer Memory Card International Association Ethernet Network Twisted Pair Port (8 conductors) TERM USED KYBD Bus Port VGA, SVGA, XGA COM1:,COM2:,COM3:,COM4: LPT1:LPT2:, PRN SCSI USB USB 2.0 IEEE-1394 IrDA MIDI Modular Jack CONNECTOR DIN 5F DIN 5F HDB15F DB9M or DB25M DBM25F Centronics 36F Series A USB Series A USB Special Wireless DB15F RJ-11F PCMCIA Modular Jack Header RJ-45F Universal Serial Bus (USB) and Firewire These are bus ports. They are growing in popularity due to their ease of use, availability and hot-swap capability. These ports also act as external buses, supporting multiple devices, when used in conjunction with a hub. These standards allow equipment to have compatibility among different platforms and types of computers. These ports support a large variety of devices, and even permit networking, without additional equipment. USB2 allows 100 mbts./sec. Transmissions and will replace USB. IrDA ,900 mhz and Bluetooth Connections These standards for wireless connections of components employ small transceivers for very short distance (within a few feet) communication between devices. IrDA employs modulated invisible light in the infra-red spectrum (like a TV remote) and works “line of sight”. While it will bounce off surfaces and pass through some materials like paper and fabric, it will not penetrate structural material so is limited to the same room. 900 Mhz and Bluetooth use modulated radio frequency and will work through obstructions for short distances. However, these frequencies do not bounce off surfaces efficiently.