Problem 42709. Find 1's Complement
Find 1's complement of a binary number
For Example:
x = 10011010
1's complement of x = 01100101
Solution Stats
Problem Comments
-
7 Comments
Required output is an array of single digits.
What is the input? Number? String?
What is the output? Array of digits, as Bjorn said?
nice one
Nice One! :v
input is a number and the output should be an array
I have updated the test case. Solvers should check if their solution sill works. Happy coding
How are we supposed to determine the number of leading zeros? (5th test)
Solution Comments
Show commentsProblem Recent Solvers20
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
47571 Solvers
-
1878 Solvers
-
Replace multiples of 5 with NaN
432 Solvers
-
find the roots of a quadratic equation
223 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
368 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!