How to generate all binary number till 256 as 00000000, 00000001, 00000010, 00000011, 00000100, ..........​..........​..........​...., 11111111 ?

5 views (last 30 days)
I am thinking that it can be generated by using staging 0 and 1 in prefix to {0, 1} and repeat it till the desired answer.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 17 Jul 2015
Edited: Azzi Abdelmalek on 17 Jul 2015
dec2bin((0:255)')

More Answers (0)

Community Treasure Hunt

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

Start Hunting!