Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

XOR: Bits and Nybbles

116 views

Published on

For a college course -- CNIT 140: "Cryptography for Computer Networks" at City College San Francisco
Instructor: Sam Bowne
More info: https://samsclass.info/141/141_F17.shtml

Published in: Education
  • Be the first to comment

  • Be the first to like this

XOR: Bits and Nybbles

  1. 1. XOR Bits and Nybbles
  2. 2. One Bit 0 ⊕ 0 = 0 0 ⊕ 1 = 1 1 ⊕ 0 = 1 1 ⊕ 1 = 0 In book, XOR is ⊕ In Python, XOR is ^
  3. 3. One Bit in Python
  4. 4. Two Bits 00 ⊕ 00 = 00 00 ⊕ 01 = 01 01 ⊕ 01 = 00 01 ⊕ 11 = 10
  5. 5. Two Bits in Python
  6. 6. Four Bits 0000 ⊕ 1000 = 1000 1100 ⊕ 0001 = 1101 1111 ⊕ 1110 = 0001 0101 ⊕ 1010 = 1111
  7. 7. Four Bits in Python

×