Skip to Main Content Skip to Search
Product Documentation

bin - Binary representation of stored integer of fi object

Syntax

bin(a)

Description

bin(a) returns the stored integer of fi object a in unsigned binary format as a string. bin(a) is equivalent to a.bin.

Fixed-point numbers can be represented as

or, equivalently as

The stored integer is the raw binary number, in which the binary point is assumed to be at the far right of the word.

Examples

The following code

a = fi([-1 1],1,8,7);
y = bin(a)
z = a.bin

returns

y = 

		10000000   01111111

z = 

		10000000   01111111

See Also

dec | hex | oct | storedInteger

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS