|
|
Digital Truth is an application that allows you to feed in a digital boolean equation and have the output displayed or written to a file (application version only). It was initally a text based application but I managed to get it somewhat GUI (Graphical User Interface). The program is written entirely in Java so it was possible to write both the program as both an applet and applications. The applications will be up shortly as I am concentrateing mainly on the applet as most computers can run applets. Through the applet, you can check Logical Equivalence (see note), display equation truth tables, check if an equation is a tautology, or see if an equation is inconsistent. NOTE: To the applet, logical equivalance is represented by the same output for the function. For example, AB is logically equivalent to CD, according to the applet. This is because it has the same output in its truth table. Thus, for this example, AB could be replaced by CD if, for example, A = C and B = D. While this may not be entirely true according to some minds on the subject, I think it gives more information then saying no because the variables don't match. When I get time, I will have the applet show you an example of what variables should match. If you are new to Truth Tables, I have found a web page that seems to give a pretty good overview on Truth Tables. To check it out, goto How to use Truth Tables. : You must use MJR (preferably 2.1.4 or better). This means that you will either have to use Apple Applet Runner (recommended) or Microsoft IE (with the Java virtual machine set to MJR). Netscape 4.7 (Mac) or less (and maybe later versions) seem to have a problem. At this time, Netscape uses its own Java virtual machine and unfortunately is not quite handling ActionListeners (which I decided to switch to using in DigitalLogic). If you experience problems with the GUI, some MJR versions view the GUI a little different. For now, if you have problems, use Apple Applet Runner and expand it to full screen. Right now, if you print the truth table, it will only print the first page. When I get time, I will put the code in for it to print multiple pages. But it shouldn't bother you if you don't use too many variables. The entire table will display to the screen though. The format of the equations are as follows:
The following are two examples of how it works. The output was taken from the text based program. The outputs for the applications and applets are graphical (see the applet for an example). Typing the Equation:
Typing the Equation:
Thus, you will get the A XORed with the (BC) and not the AxB first and then ANDed with the C. This the above truth table is for: And now, what you've all been waiting for... THE APPLET!! PLEASE NOTE: This applet has been tested with Sun's AppletViewer (UNIX/PC), Netscape Communicator 4.6/4.7 (PC), Internet Explorer 5 (PC)/4.5 (MAC), and Apple Applet Runner (Mac). If you have problems printing in IE, use Netcape for PC, AppletViewer (PC/UNIX) or Apple Applet Runner (Mac). ALSO: I am going to put up a page very shortly with just the applet so that you can print just the truth table if you like. That way, you don't have to print all of this web page every time you want to save a table. As always, feel free to email me if you have any questions or problems. FastCounter by bCentral |