Computer Codes

An endeavour to break up modern-day codes “confusion” from an engineering perspective. Hopefully fairly intelligible :-)

A lot of this most of you probably know, though sometimes who licenses what (and when) can be a bit obscure.

Operating Systems and "Opcodes"

Regarding the Internet, world wide web servers, and internal office network servers, AT&T’s Unix (with its offshoot Linux) and Windows Server (owned by Microsoft) are the two pretty much universal operating systems out there.

Regarding the web, it was built on the HTTP protocol developed by Tim Berners-Lee in 1990 on Steve Jobs's Unix-based NextStep computers in Geneva. Its goal was to be able to have a standard for two-way communication with computers anywhere in the world, by using an easy-to-read interface language that he called HTML. Click here for further background on how that unfolded. Click here for the Apache Web Server, the world's most popular web software, based on Tim Berners-Lee's work.

Like all operating systems, (including those running on Desktops and Mobile computers), each system oversees one or more arithmetic/logic units inside its single or multi-core processor chip, a small amount of processor memory registers, a program counter i.e. a “where am I in the program?” register that contains the program's next memory address, the “am I reading or writing?” control line, a "data ready? YN" control line, and a “back side bus” — an internal memory cache that also lives inside this processor chip. The processor is connected to a “front side bus“ — memory communication lines that communicate with the computer’s main memory, also separate lines for external peripherals connected via expansion cards e.g. hard-disk drive, solid-state drive, modem, mouse, screen, keyboard, DVD etc.

Mobile Computers: smartphones and tablets - Apple’s Samsung and TSMC processors running Apple's iOS operating system plus its Safari browser, and Google’s licensed processors running the Android operating system based on Linux software plus its Chrome browser, both use 64 bit chip technology licensed from ARM Ltd, a company started in the mid-90s by Acorn Computers in England (makers of the 1980s BBC Micro) in collaboration with Apple.

For further information about developing software on Apple devices, click here for XCode, free from Apple. It works mainly with Apple's major programming languages: Objective-C and Swift, also Java and C++.

Click here for Android Studio, free from Google, for developing Java programs. It has tended to replace Eclipse, a development platform originally written by IBM.

Desktop Computers are nearly 90% Microsoft Windows, with most of the rest running on Apple Macs on OS X, a version of Unix. They both mostly use an Intel chip — whose instruction set is commonly called the x86 (32 bit) instruction set from their original 16 bit micro computer processing architecture written back in the 1970s. Opposition comes from AMD a crowd who copied the Intel instruction set , but in some ways made the architecture better, or cheaper. In interesting irony, when Intel released an instruction set (IA-64) for a 64 bit processor in 2001, AMD, working on the 32 bit x86 model, refused to copy it and released its own instruction set (AMD64 in 2003). Very confusing for 64-bit programmers programming applications for 64-bit Windows XP. So 64-bit was hardly ever sold, too risky. Eventually Intel released a variation for Windows called x86-64 or Intel 64 picking up on AMD’s ideas in 2006 which the vast majority of 64-bit Windows based programs now run inside. Click here for further background to this issue.

Click here for Visual Studio, the Microsoft Windows development platform for its major languages: C# and C++, also C and Visual Basic.NET.

x86 CISC Opcodes: Click here for a recent Intel reference list in 2014, sorted alphabetically. Click here for an older 32-bit list, sorted numerically. 80x86 is referred to as variable length CISC complex instruction set coding, with its constants and address offsets loaded separately, apart from the opcode. Each opcode instruction needs to be decoded inside the chip, generating multiple lines of microcode, which then require several processing cycles to execute.

Click here and here for the original 8-bit Intel 8080 Instruction Set in 1974 and the Clock cycles involved. These were the basis for its popular 8086 chip that had 16 bits (64K) as its largest register value, and 20 bits (1 megabyte) of memory addressability (working with two registers, a segment address register and an offset address register).

MS-DOS (PC DOS), which became Intel's dominant PC operating system after 1981, relied on BIOS firmware services found on a chip — microcode-implemented instruction sets for disk, keyboard, and text display functions.
Today MS Windows and Linux have generally stopped using this BIOS chip, replaced it with UEFI instructions found on each hard drive, then after loading the operating system into memory, access all hardware components via low-level device drivers found in their "kernel".
Click here for more on today's MS Windows model.

ARM RISC Opcodes: Click here for ARM's background to its low power, fixed length (32 bit) RISC reduced instruction set coding that runs on mobile computers such as Apple's iPhone and iPads, and Google's Android smartphones and tablets. Each "simple" instruction takes the place of microcode, and although there are many more of them compared to CISC, each one, theoretically, takes only one processing cycle to execute. Note too, unlike Apple, Google's Android manufacturers require firmware to be loaded, thus employ a "Just-in-time" compilation (via an Android Runtime) to generate these "simple" instructions on its devices.

So, with every processing cycle say, on a 1ghz machine (i.e. 1 billion pulses / cycles per second), 64 bit processors can theoretically address anywhere up to 18,446,744,073,709,551,615 (2^64) internal memory points, reading or writing a data range from ± 10-308 ... 10308 with 15-17 decimal digits precision numerically, or 8 ASCII alpha-numeric characters with each computer cycle. Graphically, that enables very rapid “pixel-mapping”. This contrasts with 32 bit chips, whose memory address maximum is 4 gigabytes, 4 billion addresses on any single computer and 32 bits (4 ASCII alpha-numeric characters) each cycle.

Now, when the data is higher than the processor can handle in a single cycle, then it needs to use additional machine cycles, for “carrying” its previous calculation results. And it can’t execute a program line that refers to an address that’s outside its address range. This is why the operating system (if it’s 32 bit), can’t run a 64 bit program with 64 bit memory addresses. However the reverse is normally ok, a 32 bit program is fine, both on 32-bit and 64-bit operating systems.

Computer Cable and "Clock Cycles"

There are two main types of computer cables, a power cable and a data cable. The power cable is any cable that powers the device. The data cable is a cable to provide communication between devices.

The transmission of a single-ended signal, say ±5 volts, between a computer's memory and a serial device such as a keyboard, a computer screen, or a dial-up telephone modem, occurs by synchronizing the clock signal of the computer and the device, and then in a single clock cycle — for a definition of a "clock cycle" - see below — a predefined difference in the voltage levels between the signal wire and the ground wire, with the signal wire being, say, positively charged, will equal a "1" or a single digital computer bit. If this level remains constant for two clock cycles that would be "11".

If it switches to a negative voltage for four clock cycles that would be "0000". Back to a positive charge for two clock cycles for "11".

Thus the positive/negative voltage combined with the clock signal enables the transmission of 8 bits as "11000011" , which translates into a single byte or character. Quite similar to sending (and receiving) Morse code, except the "byte" size is fixed. A collection of bytes — say 1500 bytes or so — is called a packet which can then get converted by a dial up telephone modem to a narrowband transmission signal over your telephone cable to your local ISP. Each of the Internet packets contains a header section. The header contains the destination IP address and the source IP address which enables switching i.e. forwarding through individual routers to a destination and then a reply sent back to the source.

Faster than dialup is continuous broadband Internet transmission, which employs high frequencies over an ADSL modem or a fibre-optic / coaxial Cable modem connected to most home computers now via ubiquitous 8-wire Ethernet cable. The Ethernet cable employs faster differential signalling over two pairs of the wires, one pair to transmit and one pair to receive.

Now back to digital signals and clock cycles. A computer's clock signal is determined by a quartz crystal which oscillates (vibrates) at a certain frequency and is usually expressed in MHz (mega-hertz, million of cycles/second) or GHz (giga-hertz, billion of cycles/second). Computer microprocessors execute their instructions, like adding two numbers together, measured by these clock cycles. In contrast to the serial link mentioned above, a 32-bit microprocessor has a group of 32 wires, called a data path or a parallel bus, and will transmit 32 bits along this computer bus - from memory - through the processor and its ALU (arithmetic/logic unit) and back to memory again in a set number of cycles. And in this scenario, 3.3 volts (High Level) on a wire is a "1" and zero volts (Low Level) on a wire a "0".

Click here to read a great article on the German chap who "wirelessly" explored this brilliant "Clock Cycle" principle.

And click here to read about the convoluted process over thousands of years, under no one person or group's control, by which today's clock/calendar came into being culminating in its use worldwide over the past 100 years.