Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Boolean Algebra

  1. Jan 3, 2005 #1
    If anyone knows anything about the basics of Boolean Algebra please tell me what you know. Thanks

    ----- Life is a problem.... SOLVE IT!!!!!!
     
  2. jcsd
  3. Jan 4, 2005 #2
    (i think) a (finite) Boolean algebra must have [itex]2^n[/itex] elements, for some [itex]n \in \mathbb{N}[/itex] and they form a ring:

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

    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 [itex]\cal{B} = \{[/itex][itex]0,1[/itex][itex]\}[/itex] and define:

    [tex] 0+0=0; 0+1=1+0=1+1=1[/tex]
    [tex] 0\cdot0=0=1\cdot0=0\cdot1; 1\cdot1=1[/tex]
    [tex] \overline{0}=1; \overline{1}=0[/tex]

    where [itex]\overline{n}[/itex] indicates the complement of n.

    so, [itex]x^2 =x \cdot x=xx=x, \forall x \in\cal {B}[/itex]

    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: Jan 4, 2005
  4. Jan 4, 2005 #3
    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.
     
  5. Jan 4, 2005 #4
    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!
     
  6. Jan 4, 2005 #5

    Gokul43201

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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] = ?
     
  7. Jan 4, 2005 #6

    Gokul43201

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Note the following corrections/additions (in bold) :

     
  8. Jan 4, 2005 #7
    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! :tongue: 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 [itex]n \in \mathbb{N}[/itex], then [itex]{{\cal B}^{n}} = \{({b_1},{b_2},\ldots,{b_n})\vert{b_i} \in \{[/itex][itex]0,1[/itex][tex]\}, 1 <= i <= n \}[/itex] So a function [itex] f:{{\cal B}^n}\longrightarrow{\cal B}[/itex] is a Boolean/Switching function of [itex]n[/itex] variables.

    Let [itex] f:{\cal B}^3\longrightarrow\cal{B}[/itex], where [itex]f(x,y,z) = xy+z[/itex] Then:

    [tex]
    \begin{tabular}{argument}
    \hline
    x & y & z & xy & f(x,y,z)=xy+z \\
    \hline
    0 & 0 & 0 & 0 & 0\\
    0 & 0 & 1 & 0 & 1\\
    0 & 1 & 0 & 0 & 0\\
    0 & 1 & 1 & 0 & 1\\
    1 & 0 & 0 & 0 & 0\\
    1 & 0 & 1 & 0 & 1\\
    1 & 1 & 0 & 1 & 1\\
    1 & 1 & 1 & 1 & 1\\
    \hline
    \end{tabular}
    [/tex]

    They bow down to the usual laws as well as:

    Demorgans Law where
    [itex]\overline{x+y} = \overline{x}\overline{y}[/itex]
    [itex]\overline{xy} = \overling{x}+\overline{y}[/itex]

    Idempotent Law where
    [itex]x+y=x[/itex]
    [itex]xx=x[/itex]

    Dominance Law:
    [itex]x+1=1[/itex]
    [itex]x\cdot0=0[/itex]

    Absorption Law:
    [itex]x+xy=x[/itex]
    [itex]x(x+y)=x[/itex]

    The construction of a logical AND gate would, be a function [itex] \wedge:{\cal B}^2\longrightarrow{\cal B}[/itex] defined by [itex]\wedge(x,y) = xy[/itex] and the logical OR would be [itex] \vee:{\cal B}^2\longrightarrow\cal{B}[/itex] defined by [itex]\vee(x,y) = x+y[/itex], and NOT would just be [itex]\~(x)=\overline{x}[/itex]

    An XOR would be [itex]\oplus(x,y)=(x+y)(\overline{xy})[/itex] (i think).

    Oooh this looks interesting :bugeye: especially when there are huge networks of gates.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Boolean Algebra
  1. Boolean algebra. (Replies: 4)

Loading...