This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:c4eng:fall2023:projects:stl1 [2023/09/28 02:54] – [BITWISE NOT] mwinter4 | notes: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 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. |
====LIGHT PATTERN==== | ====LIGHT PATTERN==== | ||
Line 69: | Line 69: | ||
Which would be interpreted in binary as: | Which would be interpreted in binary as: | ||
< | < | ||
+ | |||
+ | 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> | The bitwise NOT operation, represented with the operator <wrap hi> |