How many poeple

I have no clue about binary, hexadecimal or any of that. I just know that binary is ones and zeroes. I'm new to programming so I don't know much...
 
the boolean algebra is a simple equation for a set logic...

Q is the resultant of the equation, and is either true or false depending on the conditions of the equation...

the reaon I asked if it made any sense is because the set of matmatical signs have a completly different meaning...

+ means OR
* means AND
! means NOT

so if I say Q = A,
if A is true then Q is true.
if the equation is Q = A+B
the Q will be true if either A is true or B is true or if both A and B are true

the ! means not...

so if Q = !A
Q will only be true if condition A is false...

so if Q = !A+!B Q is only true if condition A and condition B are both false...
as I said, * means AND...
so if q = A*B Q is only true if A and B conditions are both met...
if I said Q = !(A*B) then Q is only true if neither condition A or condition B are false..

HoLd on a minute that means that means that
Q = !A+!B = !(A*B)...

boolean algebra is all about taking complicated logical expressions an simplifying them according to simple sets of rules...

for instance...
Q = (A*B) + (A*!B) can be simplified to Q = A

this is mightly useful in electronics when you are looking at true and false to mean voltages...

but it's also quite useful in programming of computers when you might be loking at a statement like

IF ((checkbox1.checked == TRUE AND checkbox2.checked == TRUE)OR(checkbox1.checked==TRUE AND checkbox2.checked=FALSE)) THEN...

can easily be simplified to IF(checkbox1.checked == TRUE) THEN...
 
Ok lets say you got the following binary code
10101110

In hex it'll equal
AE
Oct it'll equal
256

Oct is unit of 3 so basically you take the binary number and chop it up like this
10 101 110
2 5 6

Now Hex is based on 0 to F and based on 4. So you'd cut up the binary like this
1010 1110
A E
 
I remember thinking how cool it was when I first learned how to do it. Its like speaking another language - not many people can do it!
 
programming to me is also like speaking another language :)


We did learn the and, not and or when we did scheme. We used it when making conditionals... for example [(and(>= input 50) (<= input 70)) true]
 
Back
Top Bottom