User Tools

Site Tools


notes:c4eng:fall2023:projects:stl1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:c4eng:fall2023:projects:stl1 [2023/09/28 02:54] – [BITWISE NOT] mwinter4notes:c4eng:fall2023:projects:stl1 [2023/09/28 02:57] (current) – [BITWISE EXCLUSIVE OR] mwinter4
Line 15: Line 15:
  
 ====USING BINARY==== ====USING BINARY====
-To show that a number is in binary use 0b before it. For example: 0b0000 would represent 0 in binary and 0b1111 would be equivalent to 15 in the decimal system. Otherwise, 1111 may be confused for 1,111 in decimal. This project can be done in decimal, but it may make it easier to use decimal, because 0b0010 definitely requires the twos place LED to light up, since the LEDs are counting in binary.+To show that a number is in binaryuse 0b before it. For example: 0b0000 would represent 0 in binary and 0b1111 would be equivalent to 15 in the decimal system. Otherwise, 1111 may be confused for 1,111 in decimal. This project can be done in decimal, but it may make it easier to use decimal, because 0b0010 definitely requires the twos place LED to light up, since the LEDs are counting in binary.
 ====LIGHT PATTERN==== ====LIGHT PATTERN====
  
Line 69: Line 69:
 Which would be interpreted in binary as: Which would be interpreted in binary as:
 <code>0011 ^ 0111 == 0100</code>  <code>0011 ^ 0111 == 0100</code> 
 +
 +XOR is an important operation that, when combined with AND, can do operations such as binary addition. 
 ====BITWISE NOT==== ====BITWISE NOT====
 The bitwise NOT operation, represented with the operator <wrap hi>~</wrap>, can be thought of simply as an inverter. That is, it takes some operand and inverts each bit.  The bitwise NOT operation, represented with the operator <wrap hi>~</wrap>, can be thought of simply as an inverter. That is, it takes some operand and inverts each bit. 
notes/c4eng/fall2023/projects/stl1.1695869647.txt.gz · Last modified: 2023/09/28 02:54 by mwinter4