<div dir="ltr">The integer-unit bit syntax should help you.<div><a href="http://erlang.org/doc/programming_examples/bit_syntax.html#segments">http://erlang.org/doc/programming_examples/bit_syntax.html#segments</a><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div><br></div><div>Cheers,</div><div>-- </div><div>Pierre Fenoll</div></div><div><br></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 19 Jun 2018 at 17:33, Bob Cowdery <<a href="mailto:bob@bobcowdery.plus.com">bob@bobcowdery.plus.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If I have a number, say 1450000001 and I want to represent that as a <br>
binary in the form<br>
<br>
  <<16#14,16#50,16#00,16#00,16#01>> what's the best way.<br>
<br>
I'm not sure what list_to_binary(integer_to_list(1450000001)) which <br>
prints as <<"1450000001">> produces but I guess its 10 bytes not 5.<br>
<br>
BobC<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>