Skip to content

Instantly share code, notes, and snippets.

@OtavioHenrique
Last active August 27, 2018 02:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OtavioHenrique/466517c274e3cd20c00ab7210bec3248 to your computer and use it in GitHub Desktop.
Save OtavioHenrique/466517c274e3cd20c00ab7210bec3248 to your computer and use it in GitHub Desktop.

Ex. A=B * C

------- Command Memory Command Operation
00001 00001011 00010010 READ B
00010 00001101 xxxxxxxx WAIT B
00011 00001011 11000000 READ C
00100 00001101 xxxxxxxx WAIT C
----- -------- -------- ------
00101 00000001 00010000 LOAD A
00110 00000100 11000000 ADD C
00111 00000010 00010000 STORE A
01000 00000001 00000001 LOAD 1
01001 00000101 xxxxxxxx NEG 1
01010 00000100 00010010 ADD B
01011 00000010 00010010 STORE B
01100 00001010 00101 JGT 00101
----- -------- -------- ---------
01101 00001100 00010000 WRITE A
01110 00001101 xxxxxxxx WAIT A
01111 00000000 xxxxxxxx STOP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment