Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Given an integer greater than 9, print all the bits in the reverse order, 1's value first, and then 2's value and then the 4's
Given an integer greater than 9, print all the bits in the reverse order, 1's value first, and then 2's value and then the 4's value, and then the 8's value and so on, with a space in between.
Example input 3
output will be 1 1
Example input 37
output will be 1 0 1 0 0 1
Example input: 64
output: 0 0 0 0 0 0 1
Note: I need a code in python please
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started