XOR/OR/AND

Operating Mode

 

1. XOR R[x],R[y],R[z]

 

R[x] := R[y] R[z] ( = XOR)

 

2. OR R[x],R[y],R[z]

 

R[x] := R[y] + R[z] (+ = OR)

 

3. AND R[x],R[y],R[z]

 

R[x] := R[y] * R[z] (* = AND)

 

PC := PC + 1

 

Description

 

Bitwise exclusiv - OR, OR, AND with content of registers R[y] and R[z].

Result is saved to R[x].

 

Status Register

 

Zero - Bit := 1 if all Bits of R[y] are 0 after operation

 

Binary Command

 

1. XOR

15 14 13 12 11

10 9 8

7 6

5 4 3

2 1 0

00001

Adr(x)

--

Adr(y)

Adr(z)

 

2. OR

15 14 13 12 11

10 9 8

7 6

5 4 3

2 1 0

00010

Adr(x)

--

Adr(y)

Adr(z)

 

3. AND

15 14 13 12 11

10 9 8

7 6

5 4 3

2 1 0

00011

Adr(x)

--

Adr(y)

Adr(z)

 

Examples

 

1. XOR R[3],R[6],R[4]

15 14 13 12 11

10 9 8

7 6

5 4 3

2 1 0

00001

011

--

110

100

 

2. OR R[3],R[6],R[4]

15 14 13 12 11

10 9 8

7 6

5 4 3

2 1 0

00010

011

--

110

100

 

3. AND R[3],R[6],R[4]

15 14 13 12 11

10 9 8

7 6

5 4 3

2 1 0

00011

011

--

110

100

Note
Arithmetic and Logical Commands always affect the Status Bits Carry and Zero.
After any Logical Command the Carry Bit is set to 0.