Binary and Octal numbers and programming the PDP 8i in octal!

 

Computers deal with electrical voltages or currents. The most obvious way to control a current is to use a switch. A switch may be replaced by a relay (which is an electrically controlled switch) or a transistor (another kind of electrically controlled switch). Finally, an integrated circuit is composed of many transistors with associated interconnections in a single package. All of these devices have the advantage of being binary.

Binary devices are simple.

Binary inputs and outputs are unambiguous (either high or low / on or off).

Binary devices are less prone to noise.

 

Representing Numbers:

Analog:

To represent numbers we could use various levels of voltage (or current). However electrical devices are imperfect and intermediate values would be ambiguous. That would be an analog system. Analog systems are fine if intermediate values are acceptable.

 

Binary;

Binary devices have just 2 states: 0, and 1. It could be on/off or low/high voltages.

 

Computer algorithms tend to have multiple stages, so binary circuits are used to avoid ambiguous states.

 

You can represent arbitrarily large numbers by simply using multiple binary digits.

 

Decimal

Binary

Hex

0

0000

0

1

0001

1

2

0010

2

3

0011

3

4

0100

4

5

0101

5

6

0110

6

7

0111

7

8

1000

8

9

1001

a

10

1010

b

11

1011

c

13

1100

d

14

1101

e

15

1111

f

 

The specific small computer we will be dealing with is the PDP 8. It was a comparatively simple computer, having only one “accumulator†register. All arithmetic operations were carried out using the accumulator. All inputs and outputs also flowed through the accumulator.

This machine used 12 bit words, and generally they were broken down into groups of 3, so the fact that there were only 8 combinations of 3 ones and zeroes, the number system was called the octal system, as shown on the following chart

 

 

Decimal

Octal

0

000

1

001

2

010

3

011

4

100

5

101

6

110

7

111

 

And these can be joined together. For example, 153 octal would be 001 101 011 binary

and 110 010 111 binary would be 6 2 7 octal.

 

Knowing octal to binary conversion makes it relatively easy to enter instructions into the PDP 8 using the front panel switches.

 

Here is a listing of a program for the PDP 8. It just increases the accumulator and jumps back

Loc Instr Octal Comment

0 IAC 7001 Increment Accumulator

1 ISZ 2034 Delay loop using location 34

2 JMP 1 5001 Jump to loc 1

3 JMP 0 5000 Jump to loc 0

 

 

 

Watch the video located at: PDP 8 Demohttps://www.youtube.com/watch?v=oMRDAD1JNWo&list=PLt-V4nS9-rENItgFNsPjakwJT_krU2ENB&index=2
https://www.youtube.com/watch?v=oMRDAD1JNWo&list=PLt-V4nS9-rENItgFNsPjakwJT_krU2ENB&index=2

 

https://www.youtube.com/watch?v=oMRDAD1JNWo&list=PLt-V4nS9-rENItgFNsPjakwJT_krU2ENB&index=2