Example 96: Print Binary Value
Learn how to print the binary value of a number using bitwise operators.
We'll cover the following...
Problem
Define a showBits()
function that would print the binary value stored in a one-byte entity.
Remember that you can only use bitwise operators to solve this challenge.
Example
Input | Output |
---|
Access this course and 1400+ top-rated courses and projects.