fast-counter-to-bits.nv
· 1.5 KiB · Text
Originalformat
Playground
|x to bits|
, fill b[3] with x:8, is b[3] filled?
, fill b[2] with x:4, is b[2] filled?
, fill b[1] with x:2, is b[1] filled?
, fill b[0] with x:1, is b[0] filled?
|release x, x to consume| x
|release x|
|consume x, x to consume|
|consume x|
|clear fill b[3] with x, fill b[3] with x|
|clear fill b[3] with x|
|clear fill b[2] with x, fill b[2] with x|
|clear fill b[2] with x|
|clear fill b[1] with x, fill b[1] with x|
|clear fill b[1] with x|
|clear fill b[0] with x, fill b[0] with x|
|clear fill b[0] with x|
|x, fill b[3] with x|
, x to consume
|is b[3] filled?, fill b[3] with x|
, b[3] has failed
|is b[3] filled?|
, b[3] has succeeded
|b[3] has failed|
, release x:8
, clear fill b[3] with x:8
|b[3] has succeeded|
, b[3]
, consume x:8
|x, fill b[2] with x|
, x to consume
|is b[2] filled?, fill b[2] with x|
, b[2] has failed
|is b[2] filled?|
, b[2] has succeeded
|b[2] has failed|
, release x:8
, clear fill b[2] with x:4
|b[2] has succeeded|
, b[2]
, consume x:4
|x, fill b[1] with x|
, x to consume
|is b[1] filled?, fill b[1] with x|
, b[1] has failed
|is b[1] filled?|
, b[1] has succeeded
|b[1] has failed|
, release x:2
, clear fill b[1] with x:2
|b[1] has succeeded|
, b[1]
, consume x:2
|x, fill b[0] with x|
, x to consume
|is b[0] filled?, fill b[0] with x|
, b[0] has failed
|is b[0] filled?|
, b[0] has succeeded
|b[0] has failed|
, release x
, clear fill b[0] with x
|b[0] has succeeded|
, b[0]
, consume x
||x:11, x to bits
| 1 | |x to bits| |
| 2 | , fill b[3] with x:8, is b[3] filled? |
| 3 | , fill b[2] with x:4, is b[2] filled? |
| 4 | , fill b[1] with x:2, is b[1] filled? |
| 5 | , fill b[0] with x:1, is b[0] filled? |
| 6 | |
| 7 | |release x, x to consume| x |
| 8 | |release x| |
| 9 | |
| 10 | |consume x, x to consume| |
| 11 | |consume x| |
| 12 | |
| 13 | |clear fill b[3] with x, fill b[3] with x| |
| 14 | |clear fill b[3] with x| |
| 15 | |
| 16 | |clear fill b[2] with x, fill b[2] with x| |
| 17 | |clear fill b[2] with x| |
| 18 | |
| 19 | |clear fill b[1] with x, fill b[1] with x| |
| 20 | |clear fill b[1] with x| |
| 21 | |
| 22 | |clear fill b[0] with x, fill b[0] with x| |
| 23 | |clear fill b[0] with x| |
| 24 | |
| 25 | |x, fill b[3] with x| |
| 26 | , x to consume |
| 27 | |
| 28 | |is b[3] filled?, fill b[3] with x| |
| 29 | , b[3] has failed |
| 30 | |
| 31 | |is b[3] filled?| |
| 32 | , b[3] has succeeded |
| 33 | |
| 34 | |b[3] has failed| |
| 35 | , release x:8 |
| 36 | , clear fill b[3] with x:8 |
| 37 | |b[3] has succeeded| |
| 38 | , b[3] |
| 39 | , consume x:8 |
| 40 | |
| 41 | |x, fill b[2] with x| |
| 42 | , x to consume |
| 43 | |
| 44 | |is b[2] filled?, fill b[2] with x| |
| 45 | , b[2] has failed |
| 46 | |
| 47 | |is b[2] filled?| |
| 48 | , b[2] has succeeded |
| 49 | |
| 50 | |b[2] has failed| |
| 51 | , release x:8 |
| 52 | , clear fill b[2] with x:4 |
| 53 | |
| 54 | |b[2] has succeeded| |
| 55 | , b[2] |
| 56 | , consume x:4 |
| 57 | |
| 58 | |x, fill b[1] with x| |
| 59 | , x to consume |
| 60 | |
| 61 | |is b[1] filled?, fill b[1] with x| |
| 62 | , b[1] has failed |
| 63 | |
| 64 | |is b[1] filled?| |
| 65 | , b[1] has succeeded |
| 66 | |
| 67 | |b[1] has failed| |
| 68 | , release x:2 |
| 69 | , clear fill b[1] with x:2 |
| 70 | |
| 71 | |b[1] has succeeded| |
| 72 | , b[1] |
| 73 | , consume x:2 |
| 74 | |
| 75 | |x, fill b[0] with x| |
| 76 | , x to consume |
| 77 | |
| 78 | |is b[0] filled?, fill b[0] with x| |
| 79 | , b[0] has failed |
| 80 | |
| 81 | |is b[0] filled?| |
| 82 | , b[0] has succeeded |
| 83 | |
| 84 | |b[0] has failed| |
| 85 | , release x |
| 86 | , clear fill b[0] with x |
| 87 | |
| 88 | |b[0] has succeeded| |
| 89 | , b[0] |
| 90 | , consume x |
| 91 | |
| 92 | ||x:11, x to bits |