Paste number 71119: ascii art binops, what's missing, what's prettier. sbp?

Index of paste annotations: 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1

Paste number 71119: ascii art binops, what's missing, what's prettier. sbp?
Pasted by: Monty
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ
Channel:#swhack
Paste contents:
Raw Source | XML | Display As
                               +---+---+
                            !A | 1 | 1 |
                               +---+---+
                               | 0 | 0 | 
                               +-------+ 
                   !|, nor         A            |
                  +---+---+    +---+---+    +---+---+
         !(A | B) | 1 | 0 |    | 0 | 0 |    | 0 | 1 | +
                  +---+---+    +---+---+    +---+---+ !(!A ^ !B)
                  | 0 | 0 |    | 1 | 1 |    | 1 | 1 |
                  +-------+    --------+    --------+
                      <         ==, <=>      !<, >=  
                  +---+---+    +---+---+    +---+---+
           !A & B | 0 | 1 |    | 1 | 0 |    | 1 | 0 | A | !B
                  +---+---+    +---+---+    +---+---+        
     +---+---+    | 0 | 0 |    | 0 | 1 |    | 1 | 1 |    +---+---+
   0 | 0 | 0 |    +-------+    +-------+    +-------+    | 1 | 1 | 1
     +---+---+        >        !=, ^, -      !>, <=      +---+---+
     | 0 | 0 |    +---+---+    +---+---+    +---+---+    | 1 | 1 |
     +---+---+    | 0 | 0 |    | 0 | 1 |    | 1 | 1 |    +---+---+
                  +---+---+    +---+---+    +---+---+
           A & !B | 1 | 0 |    | 1 | 0 |    | 0 | 1 | !A | B
                  +-------+    +-------+    +-------+ 
                      &            B        !&,  nand           
                  +---+---+    +---+---+    +---+---+
                * | 0 | 0 |    | 0 | 1 |    | 1 | 1 | !(A & B)
       !(!A v !B) +---+---+    +---+---+    +---+---+
                  | 0 | 1 |    | 0 | 1 |    | 1 | 0 |
                  +-------+    --------+    +-------+
                                    
                               +---+---+
                            !B | 1 | 0 |
                               +---+---+
                               | 1 | 0 |
                               +-------+

Annotations for this paste:

Annotation number 11: best yet?
Pasted by: sbp
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/B
Paste contents:
Raw Source | Display As
Key:
        a
      1   .
    0   X   .
  .   X   X   .
    0   X   .
      1   .
        b

Table:
               >       a               !a       !>

               T       T                O       O
             O   O   O   T            T   O   T   T
               O       O                T       T

  O        O       T       T        O       O       T        T
O   O    O   T   O   O   O   T    T   O   T   T   T   O    T   T
  O        O       T       T        O       O       T        T
false     and     xor      or      nor      eq     nand     true

               O       O                T       T
             O   O   O   T            T   O   T   T
               T       T                O       O

               <       b               !b       !<

Legend:

   * and, &&
   * xor, ^, ne, !=
   * or, ||
   * eq, ==, xnor
   * !>, implies
   * !<, implied by

Annotation number 10: rotated
Pasted by: sbp
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/A
Paste contents:
Raw Source | Display As
alternatively:

           O
        O fal O
           O

           O
        O and O
   O       T      O
T <lt O        O >gt T
   O       O      O
        T xor T
           T

or even:

      O
    /   \
   O fal O
    \   /
      O

Annotation number 9: variant
Pasted by: sbp
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/9
Paste contents:
Raw Source | Display As
         >gt    a          !a    !gt
          T     T           O     O
         O O   O T         T O   T T
          O     O           T     T
            
 O     O     T     T     O     O     T     T
O O   O T   O O   O T   T O   T T   T O   T T
 O     O     T     T     O     O     T     T
 f    and   xor   |or   nor   =eq   !&&    t

          O     O           T     T
         O O   O T         T O   T T
          T     T           O     O
         <lt    b          !b    !lt

Annotation number 8: what about this?
Pasted by: sbp
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/8
Paste contents:
Raw Source | Display As
         >gt    a          !a    !gt
          X     X           O     O
         O O   O X         X O   X X
          O     O           X     X
            
 O     O     X     X     X     O     O     X
O O   O X   O O   O X   X O   X X   X O   X X
 O     O     X     X     X     O     O     X
 f    and   xor   |or   !&&   =eq   nor    t

          O     O           X     X
         O O   O X         X O   X X
          X     X           O     O
         <lt    b          !b    !lt

Annotation number 7: Well it's simple (again) ...
Pasted by: Monty
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/7
Paste contents:
Raw Source | Display As
... The boxes in each column have an equal number of 0s (1s) and each box has its opposite on the opposite side (or adjacent in case of the middle column. An alternative would be from top to bottom A B == != !B !A, not sure why I didn't use that instead).

Unary seems already included, trinary wouldn't be much lulz I don't think.

Annotation number 6: okay, but in that case...
Pasted by: sbp
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/6
Paste contents:
Raw Source | Display As
In that case, I don't understand the ordering!

Why are the boxes arranged in this way?

(And what about unary and trinary for luls?)

Annotation number 5: Well the what-is-what should be obvious, the bigger version would be
Pasted by: Monty
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/5
Paste contents:
Raw Source | Display As

                                       +---B---+
                                    !A | 0 | 1 |
                                  +----+---+---+
                                  | 0  | 1 | 1 |
                                  A----+---+---+
                                  | 1  | 0 | 0 | 
                                  +------------+ 
                       +---B---+       +---B---+       +---B---+
                   !|| | 0 | 1 |    A  | 0 | 1 |    || | 0 | 1 |
                  +----+---+---+  +----+---+---+  +----+---+---+
                  | 0  | 1 | 0 |  | 0  | 0 | 0 |  | 0  | 0 | 1 |
                  A----+---+---+  A----+---+---+  A----+---+---+
                  | 1  | 0 | 0 |  | 1  | 1 | 1 |  | 1  | 1 | 1 |
                  +------------+  +------------+  +------------+
                       +---B---+       +---B---+       +---B---+
                    <  | 0 | 1 |    == | 0 | 1 |    !< | 0 | 1 |
                  +----+---+---+  +----+---+---+  +----+---+---+
                  | 0  | 0 | 1 |  | 0  | 1 | 0 |  | 0  | 1 | 0 |
       +---B---+  A----+---+---+  A----+---+---+  A----+---+---+       +---B---+
    0  | 0 | 1 |  | 1  | 0 | 0 |  | 1  | 0 | 1 |  | 1  | 1 | 1 |    1  | 0 | 1 |
  +----+---+---+  +------------+  +------------+  +------------+  +----+---+---+
  | 0  | 0 | 0 |                                                  | 0  | 1 | 1 |
  A----+---+---+       +---B---+       +---B---+       +---B---+  A----+---+---+
  | 1  | 0 | 0 |    >  | 0 | 1 |    != | 0 | 1 |    !> | 0 | 1 |  | 1  | 1 | 1 |
  +------------+  +----+---+---+  +----+---+---+  +----+---+---+  +------------+
                  | 0  | 0 | 0 |  | 0  | 0 | 1 |  | 0  | 1 | 1 |
                  A----+---+---+  A----+---+---+  A----+---+---+
                  | 1  | 1 | 0 |  | 1  | 1 | 0 |  | 1  | 0 | 1 |
                  +------------+  +------------+  +------------+
                       +---B---+       +---B---+       +---B---+
                    && | 0 | 1 |    B  | 0 | 1 |   !&& | 0 | 1 |
                  +----+---+---+  +----+---+---+  +----+---+---+
                  | 0  | 0 | 0 |  | 0  | 0 | 1 |  | 0  | 1 | 1 |
                  A----+---+---+  A----+---+---+  A----+---+---+
                  | 1  | 0 | 1 |  | 1  | 0 | 1 |  | 1  | 1 | 0 |
                  +------------+  +------------+  +------------+
                                       +---B---+
                                    !B | 0 | 1 |
                                  +----+---+---+
                                  | 0  | 1 | 0 |
                                  A----+---+---+
                                  | 1  | 1 | 0 | 
                                  +------------+


Annotation number 4: more
Pasted by: sbp
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/4
Paste contents:
Raw Source | Display As
inputs:

FFTT
FTFT

outputs:

FFFF
FFFT <- AND
FFTF
FFTT
FTFF
FTFT
FTTF <- NEQ/XOR
FTTT <- OR
TFFF <- NOR
TFFT <- EQ/XNOR
TFTF
TFTT <- reverse implication
TTFF
TTFT <- implication
TTTF <- NAND
TTTT

Annotation number 3: couple more
Pasted by: sbp
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/3
Paste contents:
Raw Source | Display As
inputs:

FFTT
FTFT

outputs:

FFFT <- AND
FFTF
FFTT
FTFF
FTFT
FTTF <- XOR
FTTT <- OR
TFFF <- NOR
TFFT <- EQ/XNOR
TFTF
TFTT <- reverse implication
TTFF
TTFT <- implication
TTTF <- NAND
TTTT

Annotation number 2: binary operators
Pasted by: sbp
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/2
Paste contents:
Raw Source | Display As
Here's a way of thinking about it for binary operators:

binary properties

inputs:

FFTT
FTFT

outputs:

FFFT <- AND
FFTF
FFTT
FTFF
FTFT
FTTF <- XOR
FTTT <- OR
TFFF <- NOR
TFFT <- XNOR
TFTF
TFTT <- reverse implication
TTFF
TTFT <- implication
TTTF
TTTT

Annotation number 1: comments
Pasted by: sbp
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1IVJ/1
Paste contents:
Raw Source | Display As
The idea of a Periodic Table for boolean logic is great. But I can't work out what the inputs and outputs here are supposed to be.

Cf. http://en.wikipedia.org/wiki/Karnaugh_map by the way.

Colorize as:
Show Line Numbers
Index of paste annotations: 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.