This chapter reviews for the reader some basic concepts and focuses on a few topics to provide a better understanding of some of the terms used in the following chapters. All of this should be cultural background youve already acquired, since the reader is expected to bring a working knowledge of C and Unix to this book, so there is no need to discuss the topics more deeply. However, two subjectsfile and software typesneed a more in-depth discussion and a clear definition, as they may lead to some confusion.
Hardware
First lets review the most basic terminology:
A PC (Personal Computer ) is a computer (either desktop or portable) whose features and price are compatible with an individuals basic needs.
The Hardware is the physical equipment, that is the tangible part of a computer, such as the case[] and all of its contents (cables included), as well as monitor, keyboard, mouse, printers, external hard disks (if any), and so on.
Each of those elements is called a hardware component ; the most important one is the processor (or CPU: Central Processing Unit ) that is responsible for executing machine language instructions.[]
Current processors, made up of only one integrated circuit ( chip ), are called microprocessors ; nearly all of the most recent are multicore , which means they have more independent CPUs[] inside the same chip.
Each processor contains some registers ; they are internal memory locations used to temporarily store data and addresses needed by the instruction execution. The bit width of these registers and the instruction set that a CPU can execute are characteristics of primary importance. The terms x86 and 80x86 both identify a family of microprocessors compatible with (having the same instructions as)[] the old 8086 equipped with 16-bit registers and produced by Intel since 1978.
The x86 family includes the following processors , produced by Intel and AMD:
16-bit processors - 8086, 80186, and 80286
32-bit processors - 80386 (i386), 80486 (i486), 80586 (Pentium), 80686 (Pentium Pro, Pentium II, Pentium III, Pentium 4, AMD-Athlon, AMD-Duron, and others)
This list is quite incomplete; it contains only some of the most common microprocessors. Please note also that 80386-80686 are not the official names.
The 32-bit x86 processors are generically called i386 ( I ntel 80 or superior), or IA-32 ( I ntel A rchitecture, bits) . Its evident that the i in i386 stands for Intel, but in the i386 family we include the compatible processors produced by other manufacturers, for example AMDs Athlon Classic (performing like Pentium III). Some people use the name i386+ to remark that this family includes superior processors, which are compatible with 80486, Pentium, and so on.
Similarly, i486 means I ntel 80 or superior; i586 and i686 have obvious meanings, although they are less frequently used. Just to give one example, at www.archlinux.org we read: Currently we have official packages optimized for the i686 and x86-64 architectures.
The 64-bit processors (Pentium D, Core 2, Core i3, i5, i7, AMD-Athlon64, AMD-AthlonII, ) are called x86_64 (or x86-64 or x64 or AMD64 ) rather than x86.
AMD64 is a synonym for x86_64. Both AMD and Intel processors belong to this family, but the IA-64 family includes 64-bit Intel Itanium series processors, which are incompatible with x86_64. Thus, IA-32 is a synonym for i386, but IA-64 isnt the same as x86_64.
The Architecture (hardware architecture) is the layout and functional scheme of the internal hardware components. By x86 architecture we mean the architecture of a generic x86 processor. The term architecture is often used as a synonym for processor, or better family of compatible processors, so its not infrequent to read a description like This (operating) system is available for x86 architecture. From this summary, we can understand the meaning of i386 architecture , x86 PC , and so on.
Lets conclude with a term that can be related to hardware as well as to software.
By platform we mean the environment (hardware and/or software context) needed for program execution. We can distinguish between the hardware platform (or hardware environment; basically the processor) and the software platform (software environment: operating system and libraries[] or other software).
Sometimes the hardware is not important; for instance, some programs are designed to be executed by other programs (hosts). Examples of this worth mentioning are browser extensions. The same extension works, in fact, on all browsers of the same type and version, even though with different operating systems and hardware; this is because the extension is written in a language understandable to the host program.
In such a case we say: extension X uses browser Y as platform.
Generally speaking, we can divide the hardware into input devices, processing unit, storage devices, and output devices.
But the hardware alone is not enough; in order to work it needs some software, which can be classified in different ways, as well see in the next section.
Software , Binary Programs, and Source Code
The software is the intangible component of a computer system; that is, all the information provided by programs and related data.
Sometimes the terms software and program are used as synonyms, but they often have different meanings that are useful to recall. Lets start from the definition of program, the simplest: a program is a sequence of instructions. In particular, a computer program is a sequence of instructions to be executed by a CPU.
We say that a program is in binary format if its instructions are encoded in machine language rather than in a high-level one (such as Basic, C, or Java).
A binary program (or binary code , or simply binary ) appears illegible to us because it mostly contains nonalphanumeric characters; its also called an executable program (or executable code , or simply an executable ), because its coded in machine language and thus is directly executable by the processor. Executable programs have some advantages, including small file size and fast execution speed because they dont need to be compiled (translated to machine language).
By contrast, we can easily read a program encoded in a high-level language as it contains almost exclusively alphanumeric characters: words ( if, then, else, while, ), numbers, and very few other symbols (punctuation marks and mathematical symbols); in addition, keywords and syntax are often inspired by the English language, so its much easier for us than reading a program written in machine language.
This type of program ( source program , source code or even source ) needs another program (compiler, interpreter) to execute or translate the formers instructions from a high-level language to low-level machine language commands.
The source code has the advantage of being easily studied and modified; if it is also freely accessible, other programmers can suggest enhancements and bug fixes, making it more secure and reliable.
In rare cases the source is written in assembly , a low-level programming language. Later well use some of its instructions, at least the most important ones. Assembly instructions are very close to machine-language commands; the translation is done by special programs known as assemblers . Because of its difficulty, assembly is used only when strictly necessary.