Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x.

For example if x is 5, y should be 250 because:

   5 (8-bit): 00000101
 250 (8-bit): 11111010

Solution Stats

115 Solutions

67 Solvers

Last Solution submitted on Dec 21, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers67

Suggested Problems

More from this Author25

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!