Description Usage Format Examples
To store and manage truthtables with an input of arbitrary size N and an output of arbitrary size M, we will use a logical matrix with size 2 ^ N rows and M columns. It is not necessary to store the input of the truthtable in the truthtable data structure because we will use the row index position of the output to infer the input. For instance: Row index position = 1 –> Input = binum of value 0. Row index position = 2 –> Input = binum of value 1. Row index position = 3 –> Input = binum of value 2. ... Row index position = 2 ^ N –> Input = binum of value 2 ^ N - 1.
1 |
An object of class R6ClassGenerator
of length 24.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # A basic example.
t1 <- algo_tt$new(2, 2);
t1$set_output("01", "11");
t1$exec("01");
plot_algo_tt_inside(t1);
# Design a constant (ie input dimension = 0) algorithm of output dimension 3.
t2 <- algo_tt$new(0, 3);
t2$set_output(input = "", output = "101");
t2$exec("");
plot_algo_tt_inside(t2);
# Design a random truth table and plot it.
t3 <- algo_tt$new(4,8):
t3$do_randomize_outputs();
plot_algo_tt_inside(t3);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.