Continuing on from my post about the CPU and Processor, there are four main factors that affect the speed of the CPU. Clock speed refers to 'ticks' of an internal clock, often one but possibly more per instruction. A faster clock results in instructions being executed at a faster rate, making the processor faster. Bus width refers to the number of wires that the bus (in the context the data bus) is comprised of. A wider bus results in a faster data transfer rate, data being broken down into fewer pieces and faster performance overall. Word length is the number of bits passed through the bus, and is often 32 or 64 bit. Large words are broken down into pieces to be transmitted through the bus. Lastly, if the CPU contains multiple processors this results in a greater number of instructions being conducted in the same amount of time. For example if a CPU contains two cores then it will be able to do the same amount of operations in half of the time that a CPU of the same clock speed with one core takes.
Machine Code Operations refer to operations in binary which are conducted on other binary numbers. High level programs such as Virtual Basic are converted into Machine Code, and executed. The machine code instructions will be comprised of an operation code (the instruction itself) and the operand (the subject of the operation). Each operation code has a unique binary number. There are three main operations:
-LOAD: load data from a specific memory location, and clear the current accumulator value (e.g. LOAD 5 would correspond to loading data from memory location 5).
-STORE: store the accumulator's current value in a memory location (e.g. STORE 5 would correspond to storing the accumulator's value in memory location 5, wiping the memory location's previous location).
-ADD: add to the total currently stored in the accumulator; may be a real number in which case a # is used (e.g. ADD #5) or a number from a memory location (e.g. ADD 5).
These instructions as well as others form the Fetch/Execute cycle in the CPU. Instructions are fetched (obtained) from main memory, and decoded (converted so that they can be understood by the processor), then executed. This cycle is made up of registries:
-Program Counter: contains the address of the subsequent instruction
-CIR: stores instructions in use during decoding and execution
-MAR: stores the address of the memory being accessed by the processor at that point
-MBR: contains data being transferred to or from the memory address contained in the MAR
-Accumulator: contains the output of the instructions after execution
They are often written in a notation like below (inequalities are used as arrows):
-PC + 1 < PC
-PC < [PC] + 1
-MAR < [PC]
-MBR < [MAR]
-CIR < [MBR]
-ACU < [CIR}
Tuesday, 30 November 2010
Monday, 29 November 2010
Boolean Algebra
This is a quick post to sum up a few points about Boolean Algebra - a way to represent logic gates algebraically.
-AND is represented as a full stop/dot
-OR is represented as a + symbol
-NOT is represented as a line above the input or the whole equation
Using DeMorgan's laws we can convert equations, and through using these conversions we make everything the opposite and as such, A+B would become NOT over the equation, (NOT A . NOT B). These can be a useful way to convert these expressions, as they can simplify them. Lastly is the order of operations, as unless the OR symbol is in a bracket, then the AND is done first. As such A+B.C = A+(B.C) and not (A+B).C.
-AND is represented as a full stop/dot
-OR is represented as a + symbol
-NOT is represented as a line above the input or the whole equation
Using DeMorgan's laws we can convert equations, and through using these conversions we make everything the opposite and as such, A+B would become NOT over the equation, (NOT A . NOT B). These can be a useful way to convert these expressions, as they can simplify them. Lastly is the order of operations, as unless the OR symbol is in a bracket, then the AND is done first. As such A+B.C = A+(B.C) and not (A+B).C.
Machine Level Architecture (Part 1 of 2)
In my computing lesson today I learned about some of the important concepts relating to the CPU (Central Processor Unit), what it is comprised of and what its functions are. The basics of the CPU can be summarised in von Neumann's 'Three Box Model' from 1945 (shown below).
The three main components:
-The Processor
-The Main Memory
-Inputs/Outputs (to the processor)
These three components are connected by a bus.
The processor interprets and executes programs which are sets of instructions. Each microprocessor may contain up to one billion transistors/logic gates. The main memory is comprised of the ROM where bootstrap (load-up) information is kept, and the RAM which is a volatile storage medium used by the processor to temporarily store information and as such this information is lost after the computer is turned off. Together these two make up what is known as Immediate Access Memory, because it can be quickly accessed by the processor. The I/O allows the processor to communicate with other devices (external peripherals), although they may not understand how these devices function. What are known as I/O devices (peripherals) are connected to the processor through an I/O port from an I/O controller, which results in the processor being compatible with new peripherals. All of these are connected by a bus, which passes information down microscopic wires, each bit passed down a different wire.
At a more fundamental level there are a greater number of components:
-Microprocessor and System Clock
-Hardware Devices and I/O
-RAM and ROM
-Control, Address, and Data Buses
In this form each bus performs a specific function. The Control Bus is generally comprised of 8 wires, and is used to send read, write, timing and reset instructions, and is two way. Secondly, the Address Bus is a one way bus that is used by the processor to specify which location it wants to read/write from. Each location has a different numeric address, meaning that it can be accessed individually. On the other hand, the data bus is used to transfer information between the processor, main memory and inputs/outputs. Running programs and storing data involves reading from and writing to the main memory (to fetch and obtain instructions in machine code), and the data bus handles this. The microprocessor executes instructions, whilst the speed of the system clock determines how many instructions are given per second. Its main functions are calculation, execution of instructions, locating components (addresses) and obtaining/sending data.
Inside the processor itself however there are even smaller components, which have even more specific functions. The PCU (Program Control Unit) executes programs separately, whilst the ALU (Arithmetic Logic Unit) carries out the instructions executed by the PCU, operating on data, and the Accumulator retains the data which is currently being operated on. Similar to their equivalents in the overall CPU, the processor contains a clock that also has a purpose relating to speed, and an internal bus allowing the components to communicate. Registers are also contained in the processor, and these are special memory for the processor's use. They may be 'dedicated' (and as such have a single, defined purpose in their design) or 'general purpose' and as such can be used to store data provisionally.
The three main components:
-The Processor
-The Main Memory
-Inputs/Outputs (to the processor)
These three components are connected by a bus.
The processor interprets and executes programs which are sets of instructions. Each microprocessor may contain up to one billion transistors/logic gates. The main memory is comprised of the ROM where bootstrap (load-up) information is kept, and the RAM which is a volatile storage medium used by the processor to temporarily store information and as such this information is lost after the computer is turned off. Together these two make up what is known as Immediate Access Memory, because it can be quickly accessed by the processor. The I/O allows the processor to communicate with other devices (external peripherals), although they may not understand how these devices function. What are known as I/O devices (peripherals) are connected to the processor through an I/O port from an I/O controller, which results in the processor being compatible with new peripherals. All of these are connected by a bus, which passes information down microscopic wires, each bit passed down a different wire.
At a more fundamental level there are a greater number of components:
-Microprocessor and System Clock
-Hardware Devices and I/O
-RAM and ROM
-Control, Address, and Data Buses
In this form each bus performs a specific function. The Control Bus is generally comprised of 8 wires, and is used to send read, write, timing and reset instructions, and is two way. Secondly, the Address Bus is a one way bus that is used by the processor to specify which location it wants to read/write from. Each location has a different numeric address, meaning that it can be accessed individually. On the other hand, the data bus is used to transfer information between the processor, main memory and inputs/outputs. Running programs and storing data involves reading from and writing to the main memory (to fetch and obtain instructions in machine code), and the data bus handles this. The microprocessor executes instructions, whilst the speed of the system clock determines how many instructions are given per second. Its main functions are calculation, execution of instructions, locating components (addresses) and obtaining/sending data.
Inside the processor itself however there are even smaller components, which have even more specific functions. The PCU (Program Control Unit) executes programs separately, whilst the ALU (Arithmetic Logic Unit) carries out the instructions executed by the PCU, operating on data, and the Accumulator retains the data which is currently being operated on. Similar to their equivalents in the overall CPU, the processor contains a clock that also has a purpose relating to speed, and an internal bus allowing the components to communicate. Registers are also contained in the processor, and these are special memory for the processor's use. They may be 'dedicated' (and as such have a single, defined purpose in their design) or 'general purpose' and as such can be used to store data provisionally.
Tuesday, 16 November 2010
Logic Gates
Logic gates are used within the digital circuits in computers, and conventional electrical circuits for many uses. Millions of them will be in a processor, used to add binary digits (1s and 0s). Their primary function involves one or two inputs and an output, and the output produced is dependent on the input and the nature of the gate. The inputs and output will be either true or false (i.e. a 1 or 0), which may be transmitted through the wire as a high/low voltage or as ons and offs. These combinations of different values of inputs and the corresponding outputs are represented in truth tables. Each type of logic gate has its own truth table.
What are known as Half-Adders and Full-Adders contain logic gates, and these are what are found in processors to add binary digits. A Half-Adder uses two inputs, an XOR gate and an AND gate, and is used two add two digits, and carry over that number two the next adder. On the other hand, a Full-Adder adds three bits, and is comprised of three inputs, two XOR gates, two AND gates and an OR gate. They also produce a sum and a carry. In processors many of these adders will be used to perform simple calculations.
What are known as Half-Adders and Full-Adders contain logic gates, and these are what are found in processors to add binary digits. A Half-Adder uses two inputs, an XOR gate and an AND gate, and is used two add two digits, and carry over that number two the next adder. On the other hand, a Full-Adder adds three bits, and is comprised of three inputs, two XOR gates, two AND gates and an OR gate. They also produce a sum and a carry. In processors many of these adders will be used to perform simple calculations.
AND gate | Both inputs must be true for the output to be true. |
| |||||||||||||||||||
OR gate | Used to express that either input or both being true will give an output that is true. |
| |||||||||||||||||||
NOT gate | The input must be false for the output to be true. These logic gates will only have one output. |
| |||||||||||||||||||
XOR gate (extended OR) | Used to express that either output but not both being true will give an output that is true. |
| |||||||||||||||||||
NAND gate (not AND) | As long as both of the inputs aren’t true then the outputs won’t be true. |
| |||||||||||||||||||
NOR gate (not OR) | Only if both inputs are false will the output be true. |
| |||||||||||||||||||
XNOR gate (extended NOR) | If neither or both of the inputs are true, then the output will be true. Therefore, if one input is true and the other is false then the output will be false. |
|
Tuesday, 2 November 2010
Secondary Storage Methods
Inputs and Outputs
Input and output devices are peripherals, and whilst inputs are used to input data and instructions into a computer, output devices either transfer information to another system or medium, or somehow get into the outside world so it can be seen or heard by humans.
One of the most important input devices in computing is the mouse, which is used to give basic commands to the computer within some kind of graphical interface, which is a type of operating system. Either using a wireless sensor or traditionally a motion-tracking ball, the mouse registers movement of the mouse along an XY axis to detect its position in relation to where it should be on the screen. Even more important is the keyboard, which is a device that was traditionally used to input text or numbers. As each key is pressed it relates it to a command for something (e.g. delete) to occur or ASCII code (binary number) so that a number or letter may be displayed.
Using a microphone to have a voice input is also considered to be important in modern times, as voice recognition means that a computer can relate what is said to a command using software. Different commands like ‘start’ or ‘save’ can be given, in addition to the ability to dictate information to be stored, for example in a word document. Additionally contemporary digital cameras and camcorders may transfer photos and videos to a computer using a USB connection or a by plugging its memory card into the computer. These devices detect light intensity using charged-coupled-devices to build up images.
Two other devices used frequently nowadays are Tablet PCs and touch sensitive devices such as E-readers. Touch screens let a user interact with a piece of software through using touch, and work by beaming infrared light across the screen, and when a beam is broken it can detect where this has occurred because of photoelectric sensors at the ends of the beams. Circuits connected to these sensors then relate where the beam has been broken to an XY coordinate, which the computer then relates to a specific command.
On the other hand, graphics tablets work in a different way as each time the pen (known as a stylus) is pressed against the screen it activates a microswitch, which causes the computer to register its movement, and the electronics in the screen itself detects the pen touching the screen and the pressure applied. An alternative version of these graphics tablets work by using a puck with buttons and cross hairs. After a line drawing is done the puck is used to align the drawing with the cross hairs which are detected by the tablet. The graphics tablet then detects the position of these cross hairs and creates a digital representation of it.
Another type of input device is a reader, and one example of this is barcode readers for which reflect light onto black and white striped barcodes and register where the light has and has not shined back, which is detected by photoelectric sensors, and is translated from an optical form to a binary number. This binary number is then generally related to an item in a database, such as a food item in a supermarket.
A different type of readers are magnetic strip readers that scan the charged magnetic strips on the back of cards which contain binary digits, and relate these to a specific number to transfer a small amount of information such as an identification code. However many of these are now being replaced by the more secure smart card readers which read the magnetic strips and decrypt encrypted data on a chip, which can be used for a security code. Each chip contains a small processor, some ROM and RAM which stores temporary data and EEPROM which stores permanent data. The other type of reader is a Radio Frequency Identification Reader, which receives information from a transponder that contains an antenna for transmitting information, and a microchip to conduct this process. These are often used for security purposes, such as identifying luggage in an airport.
Lastly, scanners beam light across a page to attain a digital image or form of an object, generally something on a piece of paper. Flatbed scanners work by moving light sensors and a very bright light below a pane of glass to detect where the light is absorbed and where it is reflected to build up a picture of what has been scanned. A colour scanner will contain differently coloured lights are used to detect the intensity of the primary colours in what is reflected to identify each shade and colour mix in each pixel, although a black and white only has a bright white light, and as such only different shades and not colours can be distinguished.
Optical Mark Readers shine light on a page and detect where light has been reflected and where it has not, to identify where a page has been marked. It converts the photoelectric readings into binary numbers to identify ‘yes’ and ‘no’. Where a mark has been made it will often be a ‘yes’ (1), and where there is no mark a ‘no’ (0). On the other hand Optical Character Readers use optical scanners to recognize characters such as letters or numbers and translate them into binary digits, which can either be used for uploading handwritten documents to a computer or organize documents.
The other three types of scanners scan fingerprints, and the retina and iris in the eye. These all work similarly as they shine light at the target and analyze what is sent back. However, whilst the fingerprint scanner uses light to judge the depth of depressions dependent on the time it takes them to return, iris scanners analyze what is reflected and record a pattern whilst retina scanners convert the reflected light into a unique image of the eye. It must also be noted that both iris and retina scanners use low intensity light for safety purposes, and that retina scanners use infrared light to create a more accurate picture.
One of the main types of output is a display, of which there are three types. Cathode Ray Tube (CRT) displays work by using a light tube which beams electrons against a phosphor coated screen that then reflects what is sent by the tube, making it visible on the screen. This process happens many times per second to make sure that the image does not appear to flicker. However, colour CRT displays work by using three sources of electrons – red, blue and green to create different intensities of these colours and mix these colours to create others on screen.
Liquid Crystal Displays work by having their liquid crystals polarized by a source of electrons to create different colours. These monitors may also contain filters to vary the shades of colours, and each liquid crystal also contains a TFT and capacitor which are responsible for changing the polarization of the light. Because of the way they do not project an image they use less energy and are as such more efficient.
Alternatively, plasma screens have a gas which is superheated to become plasma and release ultraviolet light. They have light shined through this to create colours in a similar way to LCDs in the pixels. However, plasma screens often have contrast issues because they have to be constantly primed by having a low voltage applied to each pixel, or otherwise they would respond slowly. Additionally they are inefficient because they create a high amount of heat, though are used regularly for large screens.
Two other practical output devices are speech output where words on the screen are outputted as sound, and electronic paper which uses beads that respond to when an electrically charged pencil is moved across them to show what has been inputted.
Finally, printers are an output device used to print what is on a computer’s display onto paper. An impact printer works by impacting different pins in a pattern against an ink ribbon, and then printing this pattern onto the paper. Although they are noisy and slow, they are efficient and robust. The three types of non-impact printers are inkjet printers, laser printers and plotter printers. Inkjet printers fire differently coloured inks on the page and mix them to create the desired colours, printing one line at a time. They create different colours out of cyan, magnenta, yellow and black.
Laser printers use a similar technique to a photocopier through attracting toner to charged areas, and plotter printers work by using a pen like device which moves across the page to draw on the paper – and are used for large scale items. They work by moving across the X and Y axis at the same time and the paper may be moved by the drum. All three types of non-impact printers work by using a non-physical contact such as through charging the paper.
Subscribe to:
Posts (Atom)