Replies: 6 comments 10 replies
-
The file format is a simple XML format. The result columns are stored as a BASE64 encoded array of bytes, where the bytes can have only three values:
Although there is a function in almost every programming language to create BASE64, it is very difficult to create this format by hand. This is an example of an 3 bit adder: <?xml version="1.0" encoding="utf-8"?>
<truthTable>
<variables>
<variable name="A_2"/>
<variable name="A_1"/>
<variable name="A_0"/>
<variable name="B_2"/>
<variable name="B_1"/>
<variable name="B_0"/>
</variables>
<results>
<result>
<name>S_2</name>
<values class="BoolTable">
<table>AAAAAAEBAQEAAAABAQEBAAAAAQEBAQAAAAEBAQEAAAABAQEBAAAAAAEBAQAAAAABAQEAAAAAAQEBAAAAAAEBAQ==</table>
</values>
</result>
<result>
<name>S_1</name>
<values class="BoolTable">
<table>AAABAQAAAQEAAQEAAAEBAAEBAAABAQAAAQAAAQEAAAEAAAEBAAABAQABAQAAAQEAAQEAAAEBAAABAAABAQAAAQ==</table>
</values>
</result>
<result>
<name>S_0</name>
<values class="BoolTable">
<table>AAEAAQABAAEBAAEAAQABAAABAAEAAQABAQABAAEAAQAAAQABAAEAAQEAAQABAAEAAAEAAQABAAEBAAEAAQABAA==</table>
</values>
</result>
<result>
<name>C</name>
<values class="BoolTable">
<table>AAAAAAAAAAAAAAAAAAAAAQAAAAAAAAEBAAAAAAABAQEAAAAAAQEBAQAAAAEBAQEBAAABAQEBAQEAAQEBAQEBAQ==</table>
</values>
</result>
</results>
</truthTable> The tag |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply hneeman. I'll give it a go with a little programming and a csv file to see if I can create this format. |
Beta Was this translation helpful? Give feedback.
-
Sweet, I'll give that a try. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help Helmut. I downloaded the prerelease and was able to cobble together a program to convert a csv file to the Truth Table format you provided above. Definitely appreciate the help and enjoy the utility this program provides. |
Beta Was this translation helpful? Give feedback.
-
Thank you for allowing the table to be encoded with normal text. Manually editing .tru files has been very tedious in the past. |
Beta Was this translation helpful? Give feedback.
-
I suggest that you add something about the base64 encoding to the documentation. Alternately, consider adding a binary column to the lookup data window. Why force users to consult an external table? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am looking at importing a truth table into Digital created with a spreadsheet. I see when a truth table is up, one can open a file of the format "Truth Table". What is this format and is there an easy way to make and import truth tables into Digital?
Thanks,
David Cole
Beta Was this translation helpful? Give feedback.
All reactions