-2

I need to know because I find the whole thing confusing. I'm in a college algebra class right now though some of the boolean algebra seems quite basic (commutativity, associative properties, etc. ie. basic algebra). I was reading The Art of Assembly Programming but then I hit the boolean algebra chapter and got frustrated. The author uses what I consider to be "arbitrary" symbols for his operators though I don't know what operators are ordinary. I'm used to C++ !, &&, and || operators for the NOT, AND, and OR operations respectively. There's typo's and other things in the e-book which make it more difficult to read.

The point being, is that chapter absolutely necessary to learn? Are there any beginners x64 assembly programming books out there? This computer has an AMD 64 bit processor. I was reading Programming from the ground up but its for linux. I could follow that one because its easier to read but I tried to compile an example and it did not work. Even with changes to the code to make it windows compatible, no dice.

Johanne Irish
  • 1,033
  • 2
  • 10
  • 17
  • 3
    Yes, you won't get very far unless you can form non-trivial conditions (for branches, etc.) – Oliver Charlesworth Jan 28 '13 at 17:55
  • Can you describe what symbols are "arbitrary"? Mathematical boolean symbols are a bit different from what you might see in prog. languages. You'll see something like /\ for conjunction (and), \/ for disjunction (or), negation is the only unary operator, so it's usually pretty clear (something like !x or ~x to mean "NOT x") – tredontho Jan 28 '13 at 18:03
  • Yeah the author of the book is using the " + " symbol for "OR", ' (apostrophe) for NOT, % for what looks like addition... Link to the book: http://cs.smith.edu/~thiebaut/ArtOfAssembly/CH02/CH02-1.html chapter two is boolean algebra. Edit: after reading the first answer again, I realized those were the correct symbols. – Johanne Irish Jan 28 '13 at 19:08
  • You might be better off with the PDF version ([e.g. this](http://www.plantation-productions.com/Webster/www.artofasm.com/DOS/pdf/ch02.pdf)) as the HTML one appears to be missing some characters (e.g. `•` as the shorthand for `AND`). – Alexey Frunze Jan 28 '13 at 19:18
  • Unless you work with hardware, design chips and circuits for example, you don't need more than the basic boolean operations: and or xor not, and you will probably spend a long time before you even need these basic operations. –  Jan 28 '13 at 19:33

2 Answers2

6

I'd say the basics of boolean algebra are necessary to at least understand for every programmer, irrespective of the programming language.

It gives you the ability to:

  • manipulate with bits and bit fields efficiently
  • optimize expressions (e.g. (a and b) or (c and b) = (a or c) and b; btw, if you replace and with * and or with +, you get the same thing as in your normal algebra)
  • optimize code
  • understand others' code
Alexey Frunze
  • 61,140
  • 12
  • 83
  • 180
0

Yes, it is very important to understand. Boolean algebra is used to implement hardware and is also responsible for many assembly operations. && is And, || is or, ! is not, etc. Google the truth tables for all of these, they're very simple. You only need a simple base really to understand the operations as you see them.

Nicolas
  • 93
  • 6