Boolean Algebra: Proving A'''' = A Using Complement and Binary Addition

In summary, complementing each digit in a number in binary form will create a new binary number. The new binary number is the result of adding 1 to the complement of the original number. The new binary number is always equal to the original number plus 1.
  • #1
Bipolarity
776
2
Suppose that A is an n-digit binary string: [itex] a_{0}a_{1}a_{2}...a_{n} [/itex] where [itex]a_{i}[/itex] is a member of the set [itex]\{0,1\}[/itex]

Now define the following sequence of operations:

1) Complement each digit in A to get a binary string A'
2) A'' = A' + 1 (here + is taken to mean binary addition rather than the boolean OR)
3) Complement each digit in A'' to get a new binary string A'''
4) A'''' = A''' + 1 (here + is taken to mean binary addition rather than the boolean OR)

Prove that for all A, A'''' = A

I appreciate all the help.

BiP
 
Physics news on Phys.org
  • #2
Hey Bipolarity.

When you say binary addition, are you talking for example if you have say a number in binary that is 1010112 and another number 0001002, then is the resulting number C = A + B (where we have standard addition), but C is in binary form as well?
 
  • #3
chiro said:
Hey Bipolarity.

When you say binary addition, are you talking for example if you have say a number in binary that is 1010112 and another number 0001002, then is the resulting number C = A + B (where we have standard addition), but C is in binary form as well?

Yup!

BiP
 
  • #4
One suggestion I have is to use the 2-complement system (add an extra bit that is a signed bit) and use the fact that if you want to invert a number, you simply invert the bits and add 1.

When it's done this way you can resort to normal arithmetic methods instead of a binary method.

You will have to take into account this adding of 1 in your inversions so that you retain the nature of the process, but again using the two's complement form will make it a lot easier.
 
  • #5
The correctness of the 2-complement system is precisely what it is I am trying to prove by posting this question.

BiP
 
  • #6
Ohh ok, well my suggestion would be kind of circular then.

I guess the suggestion would be to just resort to the definition of addition. Basically if you are adding something then you have a carry bit and a placement bit.

Personally I think the easiest way is to recall that if you take one number in binary form say X, and you add another number where all its bits are inverted, you will get all 1's.

Now this relates to your problem by considering how you can get an expression for complementing X + 1 (where the 1 is just something with all 1's), but this is actually not too hard because you know that if you have n 1's, you can simply re-write this has a 1 with n 0's minus 1. and doing addition on this is easy because you will be adding something with a bunch of zeroes.

Now let's say you do the above: you have a number A (and take its complement) and you had 2^(n+1) - 1. It would be nice to have a way to numerically know what A^c represents numerically as opposed to bitwise.

Basically if we complement something we know that it's complement plus the origin has all 1's which means that A + A^c = 2^(n+1) - 1 where n is the number of digits in your string.

This means that A^c = 2^(n+1) - 1 - A for any A.

So you have gone from a bitwise to a completely numerical form for your A and when this is done you simply resort to algebra rather than binary bitwise operations.

I'll wait for your response, but this is going to be basically plugging in that definition a few times and seeing how it all cancels and simplifies.
 

Related to Boolean Algebra: Proving A'''' = A Using Complement and Binary Addition

What is a complement in Boolean algebra?

A complement in Boolean algebra is the inverse or opposite of a given Boolean expression. It is represented by a bar over the expression and indicates that all values in the expression should be switched to their opposite value.

How do you find the complement of a Boolean expression?

To find the complement of a Boolean expression, simply switch all values in the expression to their opposite value. For example, if the expression is A AND B, the complement would be A bar OR B bar.

What is the purpose of using a complement in Boolean algebra?

The purpose of using a complement in Boolean algebra is to simplify and manipulate Boolean expressions. It allows for the creation of new expressions and can help to prove the equivalence of two expressions.

What is the difference between a complement and a negation in Boolean algebra?

A complement and a negation are essentially the same thing in Boolean algebra. However, a negation is typically used to describe the opposite of a single variable, while a complement is used to describe the opposite of a Boolean expression.

Can a Boolean expression have multiple complements?

Yes, a Boolean expression can have multiple complements. This occurs when there are multiple variables in the expression that need to be switched to their opposite value. Each variable would have its own complement represented by a bar over the variable.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
21
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
15
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
977
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
Back
Top