We will now look at some two-instruction programs. The first instruction will do something and the second instruction will do nothing. These short computer programs will show what an instruction (of this simple computer) can do.

Instruction_1 of the following program copies 1111 from latch 0001 to latch 0010. Notice that, because latch 0110 of instrucion_1 holds 1111, all 'to data' bits are copied to. Instruction_2 does nothing over and over.

## Before Copy 1111 to 0010 for 1111

```               latch  bit
0001  1111  from data
0010  0000  to data
0011  0000
0110  1111  'to' bits to copy to
instruction_2   1000  0000
1001  0000
1010  0000
1011  1000
1100  0000
1101  0000
1110  0000
1111  0000
```

After instruction_1 is executed, the memory has the following values.

## After Copy 1111 to 0010 for 1111

```               latch  bit
0000  1000 <------| address of instruction
0001  1111 ---|   | from data
0010  1111 <--|   | to data
0011  0000        |
instruction_1   0100  0001        | from address
0110  1111        | 'to' bits to copy to
instruction_2   1000  0000
1001  0000
1010  0000
1011  1000
1100  0000
1101  0000
1110  0000
1111  0000
```

Instruction_1 of the following program copies 0011 from latch 0001 to latch 0010. Notice that, because latch 0110 of instruction_1 holds 1111, all 'to' bits are copied to.

## Before Copy 0011 to 0010 for 0011

```               latch  bit
0001  0011  from data
0010  0000  to data
0011  0000
0110  1111  'to' bits to copy to
instruction_2   1000  0000
1001  0000
1010  0000
1011  1000
1100  0000
1101  0000
1110  0000
1111  0000
```

After instruction_1 is executed, the memory has the following values.

## After Copy 0011 to 0010 for 0011

```               latch  bit
0000  1000 <------| address of instruction
0001  0011 ---|   | from data
0010  0011 <--|   | to data
0011  0000        |
instruction_1   0100  0001        | from address
0110  1111        | 'to' bits to copy to
instruction_2   1000  0000
1001  0000
1010  0000
1011  1000
1100  0000
1101  0000
1110  0000
1111  0000
```

Instruction_1 of the following program copies the rightmost three bits (111) of 1111 from latch 0001 to latch 0010 for 0111. Notice that, because latch 0110 of instruction_1 holds 0111, the rightmost three 'to' bits are copied to.

## Before Copy 111 to 0010 for 0111

```               latch  bit
0001  1111  from data
0010  0000  to data
0011  0000
0110  0111  'to' bits to copy to
instruction_2   1000  0000
1001  0000
1010  0000
1011  1000
1100  0000
1101  0000
1110  0000
1111  0000
```

After instruction_1 is executed, the memory has the following values.

## After Copy 111 to 0010 for 0111

```               latch  bit
0000  1000 <------| address of instruction
0001  1111 ---|   | from data
0010  0111 <--|   | to data
0011  0000        |
instruction_1   0100  0001        | from address
0110  0111        | 'to' bits to copy to
instruction_2   1000  0000
1001  0000
1010  0000
1011  1000
1100  0000
1101  0000
1110  0000
1111  0000
```

Page 14

Page 13 . . . Page 1 . . . Page 15