The Intel 4004
INSIDE THE INTEL 4OO4
Mike Bedford shows you how to use an emulator to get hands-on experience of the microprocessor that started a revolution.
CREDIT:Intel
T
his issue we’re celebrating a significant 50th anniversary that’s been overlooked by many. That milestone was the announcement by Intel of “a new era of integrated electronics” as it was heralded in the November 1971 issue of
Electronics News.
The advertisement was for the Intel 4004, the world’s first microprocessor.
It’s no surprise that this breakthrough didn’t make it into the newspapers. Somewhat more surprising – given that computing and microprocessors are now synonymous – is that it seems much of the computing industry barely gave it a second glance, either. After all, compared even to the primitive computers of the early ’70s, it would have looked like a toy – and we’ll see something of its basic nature later on.
Indeed, few would have envisaged that a microprocessor would ever become the basis of general-purpose computers. It was designed to do a particular job, namely to power an electronic calculator, and even when Intel decided to promote it beyond these humble beginnings, most engineers considered it as just a replacement for discrete digital electronics chips. But no matter how basic its impact at the time, it started an industrial trend that continues to drive innovation today.
To explore its primordial design we’re taking a practical look at its architecture through programming it in assembly. As our first program we’ll investigate a simple example of adding numbers in two memory locations and storing the result in a third.
So we’re talking of what could be done in Python with a single statement such as sum = value1 + value2 . Turning to early microprocessors – which were more often programmed in assembly than today’s chips – we inevitably needed more instructions.
For example, we saw the following 8080 code needed to carry out the operation when we looked at the Altair 8800 back in LXF278.
This SIM4-01 was probably the closest thing to a 4004-based PC that ever existed, but it was really just a development aid for engineers.
VAL1 , VAL2 and SUM having been defined as memory addresses via assembler directives:
LDA VAL1
MOV B, A LDA VAL2
ADD B STA SUM
This might be a significant increase on Python’s single instruction, but that simple addition took yet more on the 4004, as the following code shows:
LDM $00
DCL FIM 0P %00000000
SRC 0P RDM FIM 0P %00000010
SRC 0P CLC ADM FIM 0P %00000100
SRC 0P WRM