Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions