Return to site index

An over-simplified description of a computer

Binary logic assumes that there are only two binary values that each information "bit" can have, generally referred to as 0 and 1, although the real values which represent them in a practical circuit component could be almost anything, depending on the type of hardware.
Binary data can be described as a series of 0's and 1's with the values of each doubling in sequence, usually with the most significant digit on the left and the least significant digit on the right, similar to decimal numbers.
Entering a long series of binary digits is prone to human errors, so it is often replaced by an easier to read format. A group of three binary digits giving 8 possible combinations can be replaced in Octal by numbers between 0-7, while four binary digits giving 16 possible combinations can be replaced in Hexadecimal (Hex) by 0-9 and a-f.

A group of individual single bit memories can be linked to form 8-bit bytes, and longer multiple byte data words, where the number of bytes depends on the system in use. Data is usually stored in 256-byte blocks.
More complex numbering systems use different types of coding to include negative numbers and floating point exponential numbers

Simple logic gates can complete mathematical steps such as addition and subtraction between words, or move all data bits in a word sideways. Multiplication, division, and other more complicated procedures, can be by repeated use of simpler steps. Frequent comparisons can be made between the resulting data word and a reference word, (often zero).
A buffer is an electrical component which is designed to provide an isolated output matching the logical value of the input but capable of connection to multiple inputs of other devices.
An inverter is a device with an output which is the opposite value to its input. A device followed by an inverter usually has an N preceding its name.
An AND gate is a multiple input device which provides an output of 1 when and only when every input is 1.
A NAND gate is a multiple input device which provides an output of 0 when and only when every input is 1.
An OR gate is a multiple input device which provides an output of 0 when and only when every input is 0.
A NOR gate is a multiple input device which provides an output of 1 when and only when every input is 0.
An "Exclusive OR" gate is a multiple input device which provides an output of 1 when and only when its inputs are neither all 0 nor all 1.
Combinations of these simple devices are used to build more complex devices.
A simple memory circuit can be built which will switch and retain the state(s) of its output(s) when one or more of it's inputs are at predefined values. Random Access Memory (RAM) contains large numbers of memory cells which can be accessed by their address, but usually all data is lost when power is removed. The hardware may be manufactured to retain that state when electrical power is removed, as Read Only Memory (ROM) or Electrically Alterable Read Only Memory (EAROM).

In practice it takes a small but finite time to switch between the binary values, and there are delays between connections even at the speed of light, so a clock pulse driver is used to initiate any changes over the entire system, with a pause before the next clock pulse to allow everything to settle. All outputs will relate to the conditions that existed just before the previous clock pulse.

A microprocessor is pre-programmed to perform a number of mathematical tasks. It will have several control and data input connections, some unidirectional, some bidirectional. Commands may be one or more bytes in length, and any associated data must follow in the correct sequence for each command. The processor may then require additional clock cycles to complete each command. Processors may have one or more on-chip memory caches, acting as a buffer to allow them to be clocked at a much higher rate than the rest of the computer. The command set will be specific to that processor type, but do not expect it to understand text input.
Complex Instruction Set Computers (CISC) have extensive circuitry built into the microprocessor to provide a large range of mathematical commands and procedures in hardware, so tend to be physically large and consume more power.
Reduced Instruction Set Computers (RISC) only provide the most often used commands within the microprocessor, possibly modified to make them more useful and efficient, and the smaller circuitry introduces less delay as signals traverse the chip. They are often built with components that require less power. Other more complex commands are performed by repeated use of the simpler commands under software control.

Individual byte and word locations in memory are selected by their binary address, and the same addressing system (Address Bus) is used for individual hardware items such as keyboard, mouse, graphics and audio systems, drives, and external connections, while the selected item connects to the Data Bus for reading or writing under Control Bus commands. The address bus is normally incremented by the system clock, but can be set to any value during operation. A Reset line holds the address bus at a known condition, normally address 0, during switch on, and that location must hold the first byte of the start address. That address is then loaded as the next address, usually to start the computer Basic Input Output System (BIOS). The amount of memory and other hardware that can be addressed is limited by the size of the address bus, and will depend on the processor type. The complete motherboard will accept and route a sequence of instructions and related data via the data bus using the control and address bus connections.

The BIOS is programmed to examine, test, and list all of the memory and hardware devices available, including the system real-time clock, together with their addresses. It will be pre-configured to match the computer motherboard defaults, but provide additional configuration options. Access to the BIOS settings is only allowed soon after switch-on, and usually requires a special keyboard entry after the initial keyboard hardware check. The configuration is saved to a battery backed memory, which will be erased if the battery fails (there is sometimes a link on the motherboard which can be used to return the memory to the original default setting). It will accept a limited number of keystrokes, and provide a graphical text display on screen, but do not expect it to understand text input.

The microprocessor will use these facilities to provide a large range of binary machine code commands specific to the processor type, and each command will require a known number of clock cycles, together with any associated data transfers, in the correct sequence, with zero errors. Further clock cycles may occur while the processor is busy. The processor will usually run at a much higher clock speed than the rest of the system, using its own very high speed cache memory, so that repeated command sequences can be run without continuous access to the main data bus.

The BIOS will try to locate, start ("Boot"), and hand control to, the main operating system.

The operating system will then take over, and control access to the computer. It will use the machine code commands to offer a much larger selection of complex commands, specific to the operating system. It may incorporate software "drivers" for the machine hardware. A sequence of commands will be passed by the operating system to the processor, which can signal when it is ready for the next command. Hardware that may only require intermittent access can request an interrupt when ready, then wait for an instruction to continue. Short periods when the processor is busy and does not require access to the data bus can be used to transfer blocks of data, for example between memory and disc drives, using Direct Memory Access, DMA. The operating system must cope with any errors outside of the basic hardware.

Software programmes are run under operating system control, and are expected to signal when they are waiting for a hardware interrupt, another process to complete, or otherwise able to pause, to enable multi-tasking with other software routines. The operating system will then allocate processor time to other routines. They will be loaded into memory locations set by the operating system, and use mainly relative addressing, backwards or forwards from the current address. They provide a sequence of commands which often include small blocks of frequently re-used command functions or modules. The Programme Counter will point to the start address of the programme in memory and be incremented at each clock pulse, but the programme can store the current address, jump to another address to use a function, and then jump back or continue as required.

Higher level languages aim to provide complex commands which should work regardless of the type of hardware or operating system, but then require a compiler or interpreter to generate the actual commands required for the system in use, (although in practice there may be some quirks that may need further attention). They may bring a large library of complex standard procedures.

Storage devices such as disc drives can be partitioned so that they behave like a number of smaller discrete devices, and the partitions are formatted to provide space for an index of file names, types, sizes, and other information.
Partitions from multiple drives can be linked as a RAID (Redundant Array of Inexpensive Devices) to give greater data security or speed.

Ordinary English language uses mainly 26 capital and 26 lower case letters, 10 numbers, and some punctuation marks. Add a few control and special characters, and it can all be listed using seven binary data bits, giving 128 combinations. This was the system used to send coded text by telephone, such as telegrams. Other languages with more accented or double characters can be added if eight binary bits are used, one byte per character, while multiple byte ISO codes provide for all forms of textual characters in all international languages.

Additional descriptions such as text size, font, colours, and page layout are introduced by graphical systems Rich Text Format (RTF) HyperText Mark-up Language (HTML) and Portable Document Format (PDF) will increase the file size by perhaps a factor of 10 or more.

The original intention of the email system was to carry information as plain text, but some email software now defaults to sending HTML rather than plain text. This may make the layout more appealing, but the reader is then prone to attack by any malware downloaded by links on the page unless the reader is configured to ignore the HTML links and display all emails as plain text. Unfortunately the plain text part of the email is sometimes difficult to find, obscured by a huge amount of additional (often unwanted) data. Some email software can be configured to send either, or both, plain and fancy text.



   Return to chrisbell.org.uk main site index