How do boolean expressions relate to algebra?

Click For Summary
Boolean expressions are foundational in both computer science and algebra, representing binary states (0 and 1) that correspond to true and false. They operate using three primary logical operators: AND, OR, and NOT, with additional operators like XOR for exclusive conditions. Boolean algebra can be visualized as a ring structure with 2^n elements, where n is a natural number, and it follows specific laws such as De Morgan's laws and the idempotent law. The discussion highlights the relationship between Boolean logic and algebraic structures, emphasizing the mathematical functions that can be derived from Boolean variables. Understanding these principles is essential for applications in programming and digital circuit design.
Problem+Solve=Reason
Messages
116
Reaction score
0
If anyone knows anything about the basics of Boolean Algebra please tell me what you know. Thanks

----- Life is a problem... SOLVE IT!
 
Mathematics news on Phys.org
(i think) a (finite) Boolean algebra must have 2^n elements, for some n \in \mathbb{N} and they form a ring:

(\mathbb{Z}/n\mathbb{Z}, +, \cdot)

They can be thought of as like, an electric switch, which can either be on (allowing the flow of current) or off (preventing it). Similary in a transistor, or television. That is, they have two-states - and we abstract the 'true and false/on and off' like:

Let \cal{B} = \{0,1\} and define:

0+0=0; 0+1=1+0=1+1=1
0\cdot0=0=1\cdot0=0\cdot1; 1\cdot1=1
\overline{0}=1; \overline{1}=0

where \overline{n} indicates the complement of n.

so, x^2 =x \cdot x=xx=x, \forall x \in\cal {B}

how does it work when n is like 8 or 16 though? :confused:

edit: oops sorry! I'm confused and talking about something else? how do you delete posts =/
check out mathworld, the mathematics of boolean algebra (stamford.edu) & wikipedia.
 
Last edited:
Oh, yes. You're only dealing with ones and zeroes, trues and falses, and other arbitrary abstractations one made.

There're three operators: AND, OR, and NOT. You can just write them with letters if you like or use: ^, V respective ~. Where AND and OR are binary operators and NOT -what it the word? -.

Then they're defined as following:
0 AND 0 = 0
1 AND 0 = 0
0 AND 1 = 0
1 AND 1 = 0

0 OR 0 = 0
1 OR 0 = 1
0 OR 1 = 1

NOT 0 = 1
NOT 1 = 0

Then we also have the XOR operator (eXclusive OR).
0 XOR 0 = 0
1 XOR 0 = 1
0 XOR 1 = 1
1 XOR 1 = 0

That's all I can remember for the moment.
 
I'm a computer programer, so I work with this a lot. Finding the result of 2 boolean expressions is easy, just think of the 0 as a negative number, and the 1 as a positive. Do the math. Exactly how does boolean logic relate to alg?

Im the master at time!
 
Gamish said:
Finding the result of 2 boolean expressions is easy, just think of the 0 as a negative number, and the 1 as a positive. Do the math.

Could you please define this approach more rigorously, so that we may actually understand how to "do the math" ?

For instance if 0 -> -x, 1 -> +y, where x,y are positive numbers, what is [0 OR 1] = ?
 
Note the following corrections/additions (in bold) :

danne89 said:
...

Then they're defined as following:
0 AND 0 = 0
1 AND 0 = 0
0 AND 1 = 0
1 AND 1 = 1

0 OR 0 = 0
1 OR 0 = 1
0 OR 1 = 1
1 OR 1 = 1
 
Gamish said:
I'm a computer programer, so I work with this a lot. Finding the result of 2 boolean expressions is easy, just think of the 0 as a negative number, and the 1 as a positive. Do the math. Exactly how does boolean logic relate to alg?

It's interesting, the fact that Boolean algebra was first developed as an abstract idea before the application. (1854 Mr Boole thought it up). He probably thought it would serve no real purpose too! :-p If only they were all here today, I remember that one dilbert episode where dilbert's garbageman (the genius) brings Benjamin Franklin back to life and he starts talking about the world wide web and TCP/IP.

If n \in \mathbb{N}, then {{\cal B}^{n}} = \{({b_1},{b_2},\ldots,{b_n})\vert{b_i} \in \{0,1\}, 1 &lt;= i &lt;= n \}[/itex] So a function f:{{\cal B}^n}\longrightarrow{\cal B} is a Boolean/Switching function of n variables.<br /> <br /> Let f:{\cal B}^3\longrightarrow\cal{B}, where f(x,y,z) = xy+z Then:<br /> <br /> &lt;br /&gt; \begin{tabular}{argument} &lt;br /&gt; \hline &lt;br /&gt; x &amp;amp; y &amp;amp; z &amp;amp; xy &amp;amp; f(x,y,z)=xy+z \\&lt;br /&gt; \hline &lt;br /&gt; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt; 0 &amp;amp; 0 &amp;amp; 1 &amp;amp; 0 &amp;amp; 1\\&lt;br /&gt; 0 &amp;amp; 1 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt; 0 &amp;amp; 1 &amp;amp; 1 &amp;amp; 0 &amp;amp; 1\\&lt;br /&gt; 1 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt; 1 &amp;amp; 0 &amp;amp; 1 &amp;amp; 0 &amp;amp; 1\\&lt;br /&gt; 1 &amp;amp; 1 &amp;amp; 0 &amp;amp; 1 &amp;amp; 1\\&lt;br /&gt; 1 &amp;amp; 1 &amp;amp; 1 &amp;amp; 1 &amp;amp; 1\\&lt;br /&gt; \hline &lt;br /&gt; \end{tabular}&lt;br /&gt;<br /> <br /> They bow down to the usual laws as well as:<br /> <br /> Demorgans Law where<br /> \overline{x+y} = \overline{x}\overline{y}<br /> \overline{xy} = \overling{x}+\overline{y}<br /> <br /> Idempotent Law where<br /> x+y=x<br /> xx=x<br /> <br /> Dominance Law:<br /> x+1=1<br /> x\cdot0=0<br /> <br /> Absorption Law:<br /> x+xy=x<br /> x(x+y)=x<br /> <br /> The construction of a logical AND gate would, be a function \wedge:{\cal B}^2\longrightarrow{\cal B} defined by \wedge(x,y) = xy and the logical OR would be \vee:{\cal B}^2\longrightarrow\cal{B} defined by \vee(x,y) = x+y, and NOT would just be \~(x)=\overline{x}<br /> <br /> An XOR would be \oplus(x,y)=(x+y)(\overline{xy}) (i think).<br /> <br /> Oooh this looks interesting <img src="https://www.physicsforums.com/styles/physicsforums/xenforo/smilies/oldschool/bugeye.gif" class="smilie" loading="lazy" alt=":bugeye:" title="Bug Eye :bugeye:" data-shortname=":bugeye:" /> especially when there are huge networks of gates.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 21 ·
Replies
21
Views
3K
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K