Boolean Algebra
#1
Some years ago I wrote a tutorial on this topic for the scripting community of Neverwinter Nights. I have now gone through this and edited it to make it relevant for QB64. As I am new to QB64, I would appreciate it if someone will download it, read it and let me know of any errors that they come across no matter how small. The package contains 2 pdf documents (the readme and the 20 page tutorial), an HTML cheat sheet and a plain text document of pre-calculated constants.

Dropbox Link removed - Download link to newer, more accurate version on page 2 of this thread.

All comments welcome.

Thanks.

TR
Reply
#2
Looks like a nice primer on the subject. I gave you a subdirectory on my machine to house it. I particularly like the HTML cheat sheet. It looks like a handy quick reference, suitable for printing and hanging over the monitor.
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
Reply
#3
Oh I bet these are loads and loads of Truth Tables... like from Logic 101, haven't looked yet, just testing my predictions Smile

Sure Truth Tables are fine but can you do this?
http://rosettacode.org/wiki/Zebra_puzzle

;-))

Update: Yep! A bunch of Tables, LOL
b = b + ...
Reply
#4
@bplus, I use a free JavaScript app to do that.

TR
Reply
#5
(05-06-2022, 11:44 AM)TarotRedhand Wrote: Some years ago I wrote a tutorial on this topic for the scripting community of Neverwinter Nights. I have now gone through this and edited it to make it relevant for QB64. As I am new to QB64, I would appreciate it if someone will download it, read it and let me know of any errors that they come across no matter how small. The package contains 2 pdf documents (the readme and the 20 page tutorial), an HTML cheat sheet and a plain text document of pre-calculated constants.

Boolean Algebra Tutorial (dropbox link)

All comments welcome.

Thanks.

TR
I have read them all through from start to finish, and found no grammatical errors - which disappointed me a bit... I can usually pick up a few little things! I haven't proofed the actual tables - I need to get a bit more familiar with it to do that, but if they're on a par with the text, it's pretty good!
Congratulations.
Phil
Reply
#6
Thanks for doing that. TBH I was worried that I had missed something while converting the included code snippets to QB64. Running the text through ms word's spelling/grammar check (and ignoring where it gets it wrong  Cool ) does tend to kill those sort of errors.

TR
Reply
#7
One little update that illustrates that using hexadecimal instead of denary can make your life easier. Here is an alternative list of bitwise constants covering bit 0 to bit 31 -
Code: (Select All)
CONST BIT00 = 1;
CONST BIT01 = 2;
CONST BIT02 = 4;
CONST BIT03 = 8;
CONST BIT04 = &H10;
CONST BIT05 = &H20;
CONST BIT06 = &H40;
CONST BIT07 = &H80;
CONST BIT08 = &H100;

CONST BIT09 = &H200;
CONST BIT10 = &H400;
CONST BIT11 = &H800;
CONST BIT12 = &H1000;
CONST BIT13 = &H2000;
CONST BIT14 = &H4000;
CONST BIT15 = &H8000;
CONST BIT16 = &H10000;

CONST BIT17 = &H20000;
CONST BIT18 = &H40000;
CONST BIT19 = &H80000;
CONST BIT20 = &H100000;
CONST BIT21 = &H200000;
CONST BIT22 = &H400000;
CONST BIT23 = &H800000;
CONST BIT24 = &H1000000;
CONST BIT25 = &H2000000;
CONST BIT26 = &H4000000;
CONST BIT27 = &H8000000;
CONST BIT28 = &H10000000;
CONST BIT29 = &H20000000;
CONST BIT30 = &H40000000;
CONST BIT31 = &H80000000;

TR
Reply
#8
Nice job, found this helpful. I guess George Boolean didn't believe that "maybe" is also a logical operator as in "this might be true or completely unfounded". Truth in today's world is confusing.
Reply
#9
Actually his name was George Boole (wikipedia). Boolean refers to things attributed to him. In this case we are dealing with mathematical logic.

TR
Reply
#10
Hi TarotRedHand . I knew it was George Boole and have no idea why I typed George Boolean. One of those Logic slips maybe??
Reply




Users browsing this thread: 4 Guest(s)