Challenge Author: NANA ATOMBO-SACKEY
Difficulty: Easy
Description
How well can you perform basic binary operations?
Process / Notes
ncinto the challenge- Perform math on binary numbers
- Binary Number 1 = 10010111
- Binary Number 2 = 11100000
- Operation = +
- Add right to left, anything that adds to 2 gets carried over as a 1 to the left > 101110111
- Operation = « on BN1
- Shifting everything to the left by 1 > 1011101110 (added a 0 to the end)
- Operation = » on BN2
- Shift everything to the right by 1 bit > 011100000 was incorrect > 11000 was correct!
- Operation = | 12 Stitch them together? Wasn’t that…
- The operation ‘OR’? > 11110111 was correct! (If there was a 1 in either position, it was a 1)
- Operation = *
- Multiply each position? > 10000000? Wasn’t that…
- Struggled here for a while. Made an attempt but was going at it with entirely the wrong outlook. Looked up how to do binary multiplication by hand, and had a better result with 1000010000100000
- Operation = &
- AND? Need both 1’s there to be a 1? > 10000000 was correct!
- It says this last answer in hex was the last answer.
- I kept trying to hex dump it, but it was really looking for that number to be converted into base 16. Discovered what the final number answer through an online calculator performing the operation for me.
42 minutes 37 seconds to complete
Hints
NONE
Core Lessons
- Understand how binary numbers / binary counting works
- Understand what each of the operations were asking for - I got lucky with my guesses on a lot of them
- Understand that hexadecimal means “base 16 counting” as well as the normal 0-9 and a-f form I’m used to associating with it.