Clear Filters
Clear Filters

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

3 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)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!