Tuesday 10 December 2019

Python - Day Twenty Seven (December)

WHAT I DID TODAY:


Today I finished all the remaining lessons I couldn't complete last class in 'Introduction to Bitwise Operators.' There were 7 lessons left that were fairly difficult, but wasn't as hard as the first half because the first half was where I had to completely learn something new and understand how the 'base' of the unit works.

THE LESSONS I COMPLETED TODAY

I have now gone up to 85% of the overall course.

85% COMPLETED



The few important exercises I did were...

  • The first exercise was pretty random, and I still kind of don't understand the purpose of this exercise, except for it just basically incorporating the new things I learned today and last class. But I think all this exercise does is to check if th 'bit' is on or not. 
EXERCISE #1


  • The second exercise was actually just a review. It was a super short review of everything I learned. All this review was that the function flip_bit taking in a number, flipping it, and storing it in as a result.
EXERCISE #2




WHAT I LEARNED:


I learned a lot of different codes/functions that works with the bitwise operators / binary numbers.



  • The first thing I learned was the & bitwise operator. The & bitwise operator compares two numbers, and returns a number where the bits of that number are turned on if the corresponding bits of both numbers are 1. This was somewhat the definition of it. I'm still trying to understand this one more because I'm still a bit iffy at some parts.
EXERCISE #1 USING &


  • The second thing I learned was the | bitwise operator. This is the OR that compares two numbers and returns a number where the bits of that number are turned on. 
EXERCISE #2 USING |


  • The third thing I learned was the ^ operator. Or also named XOR compares two numbers and returns a number where the bits of that number are turned on.
EXERCISE #3 USING ^


  • The fourth thing I learned was the ~ operator. This one was very simple as you can see. It was the only one that I truly understood. Using it prints out a number but turns it into an opposite sign. 
EXERCISE #4 USING ~



I did not talk much about these because the exercises I had to do with these were very short. I didn't have a chance to learn more about it. But maybe there isn't much to it and it's just that like it says. 



WHAT I WILL BE DOING TOMORROW / NEXT TIME:


Next time I will be moving onto the next unit. It is called, "Introduction to Classes." I'm pretty sure there are like 18 lessons or something like that, so as always I will probably split it again.

DESCRIPTION OF NEXT UNIT




No comments:

Post a Comment

Adobe Photoshop - Day 10 (June Final Post)

WHAT I DID TODAY / WHAT I LEARNED: For my final project, I thought for a while about what I could do. Then I remembered a while back I saw ...