Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 4 pages
- counter = 4 bits
- 3 ticks
- pages 1, 2, 3, 4, 8, 3, 4, 8, 7
- Empty Empty Empty Empty
- 0000 0000 0000 0000
- next is 1, 2, 3, 4, 8, 3, 4, 8, 7
- 1 Empty Empty Empty
- 1000 0000 0000 0000
- next is 2, 3, 4, 8, 3, 4, 8, 7
- 1 2 Empty Empty
- 0100 1000 0000 0000
- next is 3, 4, 8, 3, 4, 8, 7
- 1 2 3 Empty
- 00100 0100 1000 0000
- next is 4, 8, 3, 4, 8, 7
- 1 2 3 4
- 0001 0010 0100 1000
- next is 8, 3, 4, 8, 7
- 8 2 3 4
- 1000 0001 0010 0100
- next is 3, 4, 8, 7
- do nothing, but
- counter for 3 has to be updated
- 8 2 3 4
- 1000 0001 0010 0100
- next is 4, 8, 7
- do nothing, but
- counter for 3 has to be updated
- counter for 4 has to be updated
- 8 2 3 4
- 1000 0001 0010 0100
- next is 8, 7
- since 3 updates need to be done and the maximum tick is 3, we have to
- update counter for 3
- update counter for 4
- update counter for 8
- 8 2 3 4
- 1100 0000 1001 1010
- next is 7
- 8 7 3 4
- 0110 1000 0100 0101
Advertisement
Add Comment
Please, Sign In to add comment