Operations on the bits
Introduction
In the data-processing languages, for example C++, Java etc one finds operations known as: “bit by bit”. the Computer to make this type of calculation, between two entireties, must convert the entireties towards the binary system, make the operations bit by bit, then to turn over the result to the system of the departure. The objective of this article is to find methods of calculating, without passing to the binary system, and to prolong towards the unit
Operation conjunction (and) on the bits
The conjunction (and) between two entireties has and B, is represented: . In measurement or the logical operations on the proposals are homogeneous on the operations between the finished units: for example, there is a relation between the conjunction and the intersection between two finished units.
To present the entireties as a whole finished
All Integer can be connected to a finished unit, whose elements are entireties: example for 15:there is exhibitors forming a fini.
unit Thus for 15 the unit is: and for 8 the unit is: (), therefore the intersection enters the unit and is . thus
Properties
for all has, B and N whole one a:- if then
- if is even, then one a
- if is odd, then one a
- if one has
Operation disjunction (or) on the bits
Disjunction between two entireties, is an entirety associated with a unit which is the union of the two units which are associated with these two nombres.Disjunction (or) between two entireties has and B, is represented: .
example:
Properties
for all has, B and N whole one a:Operations on the bits in
Negation
Definition
The negation of entireties relative is:one has
conjunction and disjunction in
To calculate the operations conjonction and disjonction, one uses proriétés the suivantesProperties
for all has, B and N whole relative one a:- if then
- (De Morgan)
- (De Morgan)
- and
conjunction and disjunction in
Euclidean division in the binary system
For all couple, has and B in there exists only one couple in . it is true in all the systèmes.Thus one can make a division on the binary system, if R is the remainder of a division, multiply R by 10 is in fact division:
example: The divistion ,
is in decimal system, for the binary system, the same operations are made, and one finds:
, therefore one can make the operations conjunction and disjunction for the rational numbers.
| Random links: | Arruazu | Spellforce: The Order off Dawn | Concert for the tolerance | EA Sports Big | Archdiocese of Aparecida | Wiley_Ford,_la_Virginie_Occidentale |