# Microchips

## Random Access Memory (RAM)

All computers have memory to provide temporary holding space for data and programs. RAM is the main memory of a PC, and it consists of a group of silicon chips located inside the system unit on the motherboard. RAM can be thought of as a computer's work area since everything typed on the keyboard goes directly into RAM.

RAM is only available when the computer is on, and as soon as it is turned off, everything in RAM is lost.

Memory is measured in a unit called bytes. A byte is the amount of memory needed to store one character. However, computers really work with a base 2 number system consisting of only 1s and 0s. In our base 10 number system, there are 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. So after 9, we go back to 1 and 0 which is 10. However, in the computer's base 2 number system (also known as binary), there are only 2 digits: 0 and 1. This means that the first number is 0; then 1; and then instead of going to 2, the next number is 10. This 10 is the same as 2 in base 10, but is represented as 10 because there are no more digits after 1 so it must go back to a 1 followed by a 0, or 10, as we do in base 10 after we have reached a 9. So, in the computer's binary language, a 1 or a 0 is a bit. A byte is made up of eight bits. Any character of the computer keyboard can be represented by a combination of eight 1s and 0s. Computers have codes for converting bytes into characters. The most common of these is the ASCII character set. For example, in ASCII, the letter q could be represented by 10111011.

A typical PC has hundreds of thousands of bytes of RAM. A kilobyte or KB is 1024 (210) bytes. A Megabyte or MB is 1048576 (220) bytes. A gigabyte or GB is 1099511627776 (240) bytes. Most PC computers have about 8 MB of RAM.

## Type any number (7 digits or less) to convert it into its binary form.

RAM contains many storage cells. A storage cell stores 1 bit of binary code. The cells are arranged in groups of 8 so that each group stores one byte of information. Each storage cell is connected to a grid of address lines and data lines.

To store a number, a pulse is first sent to all of the cells on the address line, switching on the transistors in each cell. Then, an on/off pulse for the number goes along the data lines. Each pulse (1 bit) charges a capacitor connected to the transistor. To read the data, the cells discharge and send pulses back along the data lines.

RAM is used differently depending on the type of operating system that is installed on the computer. For example, if the computer is a Macintosh PC with System 7 installed, memory is one long string of addresses that can be used for everything. However, if DOS or Windows '95 is installed on the computer, it divides the memory into several different strings of addresses. The first 640 KB of RAM is called conventional memory. This is where system software and device drivers reside. The rest of the RAM in the first MB is called high memory. This is where other device drivers and programs the user never knows about reside. All RAM above the first MB is called extended memory or XMS. This is where most of the applications and programs a user uses reside.

Remember that when the computer is turned off, everything stored in RAM vanishes. So when the computer is first turned on again, what tells it what to do first? In addition to RAM, computers have a small amount of Read-Only Memory or ROM. This is permanent memory that stays the way it is all the time--even when the computer is turned off. ROM cannot be changed and does nothing except keep track of the computer's system configuration so that when the computer is first turned on, it knows what to do.

## Microprocessor or Central Processing Unit (CPU)

The bottom of a CPU with pins

The CPU slot on the motherboard

IBM PC computers and compatibles have microprocessors manufactured by Intel Corporation. The most common of these are the 80486 and the 80586 (known as the Pentium). However, older models such as 8088, 80286, and 80386 exist, as well as newer ones such as the 80686 (Pentium Pro). The difference between these processors is the speed at which they process information and communicate with other computer components. The higher the number, the faster information can be processed and components can be communicated with.

In the circuitry of a computer, timing is very important. A clock inside the unit regulates the timing of the computer operations. When a computer is running a program, the program instructions are sent to the microprocessor one at a time, and the timing is determined by the rate of the clock. The rate of the clock is measured in millions of cycles per second, or megahertz (Mhz). Different types of program instructions need different numbers of cycles to execute. Clock rates vary from 4.77 Mhz to 200 Mhz.

Imagine that a computer is a combination of switches, which it really is in the form of transistors. These switches are etched in a slice of silicon, and they can be turned on or off. They can be manipulated to perform addition, and from addition, all the other operations can be executed. To the computer, everything is numbers (math, software instructions, words). This lets all of the transistors do all types of data manipulation.

Transistor switches manipulate binary numbers because a transistor can be on or off, which matches with the 1 or 0 in binary. An open transistor allows no pulse to travel through, and it represents a 0. A closed transistor lets electricity from the PC's clock through, and the transistor represents a 1. The speed of the PC's clock determines the rate at which the calculations are executed. The output of a transistor can be used to control another transistor. The first switch can be changed on and off to change what the second switch represents, and such an arrangement is called a gate. Here are the functions of logic gates used in full adders and half adders.

### NOT Gates

The NOT gates uses a single transistor to perform its operation. It takes two inputs, one from the clock and one from another transistor. The output of the NOT gate is always the opposite of the input of the other transistor. An input of 1 opens the NOT gate so that the pulse from the clock cannot travel through , which makes its output 0. An input of 0 closes the NOT gate so that the pulse from the clock travels through, causing the output to be a 1.

Clock Input Input from other transistor Output
1 0 1
1 1 0

### OR Gates

Other logic gates are created by NOT gates strung together in different combinations, all of which have a line to receive pulses from the clock and two other input lines. The OR gate creates a 1 if the first or second input is a 1.

1st Input 2nd Input Output
0 0 0
0 1 1
1 0 1
1 1 1

### AND Gates

AND gates output a 1 if the first input is a 1 and if the second input is also a 1.

 1st Input 2nd Input Output 0 0 0 0 1 0 1 0 0 1 1 1

### XOR Gates

XOR gates output a 1 if only one of the inputs is a one and the other is a zero.

 1st Input 2nd Input 3rd Input 0 0 0 0 1 1 1 0 1 1 1 0

By manipulating the combinations of logic gates, a computer can be made to add, which is the fundamental operation of the computer. Two gate designs are half-adders and full-adders. A half adder consists of an AND gate and an XOR gate. It is designed to add single digit binary numbers. A full adder consists of a half adder and other switches.

+

## How Pentium Processors Work

A part of the Pentium called the Bus Interface Unit receives data and coded instructions from the computer's RAM. Data moves into the processor 64 bits at a time.

The bus interface unit sends data and code along two different paths to the code cache and data cache 64 bits at a time. The data cache can hold up to 8k of data, and the code cache holds up to 8k of coded instruction telling the processor what to do with the data. The data and code remain in both caches until the processor needs them.

The branch prediction unit inspects the instructions in the code cache and decides which of the two arithmetic logic units (ALUs) is can handle them more efficiently.

The instruction prefetch buffer gets the code and the decode unit translates it into a language the ALUs can understand.

If any floating point calculations need to be executed, they are passed through an internal processor called the floating point unit.

The execution unit consists of two arithmetic logic units and a register. Each of the ALUs receive instructions 32 bits at a time from the decode unit, and they process all the data consisting of only integers. Each ALU processes its own instructions simultaneously, using data moved from the data cache to the registers.

The two arithmetic logic units and the floating point unit send their results to the data cache. The data cache sends the data to the bus interface unit, which sends it to the RAM.

## CISC and RISC processors

CISC stands for complex instruction set computing. CISC uses commands which incorporate many small commands to execute a single operation. All of the Intel processors from the 8088 to the 80486 were based on the CISC philosophy.

RISC, reduced instruction set computing, works with smaller, more delicate pieces of data and code. RISC is a less complicated design using several simpler instructions to execute a similar operation in less time than a CISC processor executes a large, complicated command. RISC designs are found in newer processors such as the DEC Alpha, IBM's RISC 6000, the Power PC processor, and are, to an extent, in the Intel Pentium processors.