CP-1.003 Java Tutorial - Bit Manipulation
Problem: Reverse Binary Numbers (https://open.kattis.com/problems/reversebinary) An exercise involving bit manipulation in Java. It can be done without bit manipulation (using String), but I think this problem is a great opportunity to show how bit manipulation works in Java. You need to understand how binary numbers work for this problem, so if this is new to you, please start by watching some videos on them. Here's a couple of good videos on binary number that I found on YouTube: - https://www.youtube.com/watch?v=LpuPe81bc2w - https://www.youtube.com/watch?v=1GSjbWt0c9M Please see https://www.youtube.com/watch?v=2vi1o0Fr0Uk for the start of this video series. Video Sections: 0:00 - Problem description 1:55 - Binary numbers 6:12 - Solution using String 11:51 - Bitshift operator 14:42 - Solution using bit manipulation 19:36 - Writing the code using bit manipulation Please note that all views and opinions expressed in this video are my own and does not reflect that of Kattis or any other person/organisation mentioned in the video.
Download
0 formatsNo download links available.