Skip to main content

Simulating the Project

  • Use the interactive menu to change the input values (x, y) and observe the outputs.
  • Addition: zx=0, nx=0, zy=0, ny=0, f=1, no=0.

  • Subtraction: zx=0, nx=0, zy=0, ny=1, f=1, no=0 (this configuration inverts the value of y before addition).

  • AND: zx=0, nx=0, zy=0, ny=0, f=0, no=0.

  • OR: zx=0, nx=0, zy=0, ny=0, f=0, no=1 (this configuration inverts the result of an AND to achieve OR).

zx

nx

zy

ny

f

no

SaĆ­da (out)

1

0

1

0

1

0

0

1

1

1

1

1

1

1

1

1

1

0

1

0

-1

0

0

1

1

0

0

x

1

1

0

0

0

0

y

1

0

1

1

1

1

!x

1

1

0

1

1

1

!y

1

0

1

0

1

1

-x

1

1

0

0

1

1

-y

1

0

1

1

1

0

x+1

1

1

0

1

1

0

y+1

1

0

1

1

0

1

x-1

1

1

0

1

0

1

y-1

0

0

0

0

1

0

x+y

0

1

0

0

1

1

x-y

0

0

0

1

1

1

y-x

0

0

0

0

0

0

x&y

0

1

0

1

0

0

x|y

Validate the ALU's behavior for each control configuration.

  • Addition: x = 5, y = 3.
  • Subtraction: x = 7, y = 2.
  • AND: x = 0b1100, y = 0b1010.
  • OR: x = 0b1100, y = 0b1010.

Note: If you need to check the detailed logic, click on the corresponding wire to view the signals in real-time.