RosettaCodeData/Task/Variable-length-quantity/00DESCRIPTION

10 lines
601 B
Text
Raw Permalink Normal View History

2013-04-11 01:07:29 -07:00
Implement some operations on [[wp:Variable-length quantity|variable-length quantities]], at least including conversions from a normal number in the language to the binary representation of the variable-length quantity for that number, and ''vice versa''. Any variants are acceptable.
2018-06-22 20:57:24 +00:00
;Task:
With above operations,
2013-04-11 01:07:29 -07:00
*convert these two numbers 0x200000 (2097152 in decimal) and 0x1fffff (2097151 in decimal) into sequences of octets (an eight-bit byte);
*display these sequences of octets;
*convert these sequences of octets back to numbers, and check that they are equal to original numbers.
2018-06-22 20:57:24 +00:00
<br><br>