on master help sign in
2d
0f63f73Henry Ault
docs/system/hoon/library/src/2d/gate/con.md+4−4
@@ -22,7 +22,7 @@ Source
22
22
23 ++ con :: binary or
23 ++ con :: binary or
24 ~/ %con
24 ~/ %con
25− |= [a=@ b=@]
25+ |= {a/@ b/@}
26 =+ [c=0 d=0]
26 =+ [c=0 d=0]
27 |- ^- @
27 |- ^- @
28 ?: ?&(=(0 a) =(0 b)) d
28 ?: ?&(=(0 a) =(0 b)) d
@@ -30,9 +30,9 @@ Source
30 a (rsh 0 1 a)
30 a (rsh 0 1 a)
31 b (rsh 0 1 b)
31 b (rsh 0 1 b)
32 c +(c)
32 c +(c)
33− d %+ add d
33+ d %+ add d
34− %^ lsh 0 c
34+ %^ lsh 0 c
35− ?& =(0 (end 0 1 a))
35+ ?& =(0 (end 0 1 a))
36 =(0 (end 0 1 b))
36 =(0 (end 0 1 b))
37 ==
37 ==
38 ==
38 ==
docs/system/hoon/library/src/2d/gate/dis.md+6−6
@@ -2,7 +2,7 @@
2
2
3Binary AND
3Binary AND
4
4
5−Computes the bit-wise logical AND of two [atom]()s `a` and `b`, producing an
5+Computes the bit-wise logical AND of two atoms `a` and `b`, producing an
6atom.
6atom.
7
7
8Accepts
8Accepts
@@ -22,17 +22,17 @@ Source
22
22
23 ++ dis :: binary and
23 ++ dis :: binary and
24 ~/ %dis
24 ~/ %dis
25− |= [a=@ b=@]
25+ |= {a/@ b/@}
26− =| [c=@ d=@]
26+ =| {c/@ d/@}
27 |- ^- @
27 |- ^- @
28 ?: ?|(=(0 a) =(0 b)) d
28 ?: ?|(=(0 a) =(0 b)) d
29 %= $
29 %= $
30 a (rsh 0 1 a)
30 a (rsh 0 1 a)
31 b (rsh 0 1 b)
31 b (rsh 0 1 b)
32 c +(c)
32 c +(c)
33− d %+ add d
33+ d %+ add d
34− %^ lsh 0 c
34+ %^ lsh 0 c
35− ?| =(0 (end 0 1 a))
35+ ?| =(0 (end 0 1 a))
36 =(0 (end 0 1 b))
36 =(0 (end 0 1 b))
37 ==
37 ==
38 ==
38 ==
docs/system/hoon/library/src/2d/gate/mix.md+2−2
@@ -2,7 +2,7 @@
2
2
3Binary XOR
3Binary XOR
4
4
5−Produces the bit-wise logical XOR of `a` and `b`, producing an [atom]().
5+Produces the bit-wise logical XOR of `a` and `b`, producing an atom.
6
6
7Accepts
7Accepts
8-------
8-------
@@ -21,7 +21,7 @@ Source
21
21
22 ++ mix :: binary xor
22 ++ mix :: binary xor
23 ~/ %mix
23 ~/ %mix
24− |= [a=@ b=@]
24+ |= {a/@ b/@}
25 ^- @
25 ^- @
26 =+ [c=0 d=0]
26 =+ [c=0 d=0]
27 |-
27 |-
docs/system/hoon/library/src/2d/gate/not.md+4−3
@@ -8,9 +8,9 @@ of `c`.
8Accepts
8Accepts
9-------
9-------
10
10
11−`a` is a block size (see [`++bloq`]()).
11+`a` is a block size (see `++bloq`).
12
12
13−`b` is an [atom]().
13+`b` is an atom.
14
14
15`c` is an atom.
15`c` is an atom.
16
16
@@ -22,9 +22,10 @@ An atom.
22Source
22Source
23------
23------
24
24
25− ++ not |= [a=bloq b=@ c=@] :: binary not (sized)
25+ ++ not |= {a/bloq b/@ c/@} :: binary not (sized)
26 (mix c (dec (bex (mul b (bex a)))))
26 (mix c (dec (bex (mul b (bex a)))))
27
27
28+
28Examples
29Examples
29--------
30--------
30
31