Difference between revisions of "AND (binary)"

From veswiki
Jump to: navigation, search
m (1 revision)
 
Line 8: Line 8:
 
     %00100100
 
     %00100100
  
Because only those two bits are the same in each byte. The [[F8]] can only AND two bytes at a time.
+
Because only those two bits are true (1) in both bytes. The [[F8]] can only AND two bytes at a time.
  
 
== See Also ==
 
== See Also ==
 
* [[Binary logic]]
 
* [[Binary logic]]

Latest revision as of 21:41, 16 November 2012

To AND one value with another is to compare the bits of each value, and only keep the ones which are both true. For example, if you AND'd these values:

    %01100100
    %00101110

You would get:

    %00100100

Because only those two bits are true (1) in both bytes. The F8 can only AND two bytes at a time.

See Also