Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

How do you decode a binary string that is encrypted in ASCII??

Asked by Karen.k

Karen.k (view profile)

on 4 Nov 2012

binary code =00001011

1 Comment

Jan Simon

Jan Simon (view profile)

on 5 Nov 2012

The question does not contain enough information: There is an infinite number of possible encryption methods. Therefore 0001011 could be any letter. Perhaps you mean "encoded" instead of "encrypted". But even then it is not uniquely defined, which "letter" corresponds to the number 11 (binary 1011). So please provide any details.

Karen.k

Karen.k (view profile)

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson

Walter Roberson (view profile)

on 4 Nov 2012
bin2dec('00001011')

2 Comments

Karen.k

Karen.k (view profile)

on 4 Nov 2012

This gives me a number but I am looking for a letter.

Walter Roberson

Walter Roberson (view profile)

on 5 Nov 2012
char(bin2dec('00001011'))

Note: in this particular example, there is no printable glyph for the character; it is control-K

Walter Roberson

Walter Roberson (view profile)

Contact us