VarInt is a way of storing integers in such a way that only the bytes required by the integer are used. This means that smaller integers require less memory than larger integers. This method is a lot more efficient than simply using, for example, a 32 bit integer to represent a value such as 200, which should only require 8 bits of storage.
Month: February 2017
Endianness
The Endianess of a word refers to the byte order which makes up the word. We can either store the MSB (Most Significant Byte) in the smallest address which is known as Big Endian or we can store the LSB (Least Significant Byte) in the smallest address which is known as Little Endian.
Two’s Complement
Two’s complement is the method used by computers to represent integers in binary format. A binary number with an LMb (Left Most bit) of 1 is negative, while a binary number with an LMb of 0 is either a positive number, or 0. The method involves writing out the value in binary format and then inverting the binary value and adding 1.