If using the compressed format, where a byte holds two decimal digits (because only 4 bits are needed to make nine), so two bytes would be four decimal digits, the largest which is 9999.
65,535
Using the digits 12279, the largest number that can be represented is 97,221.
31 - it's binary equivalent is 11111
Explain how an integer can be represented using BCD?
A signed 16 bit number can represent the decimal numbers -32768 to 32767.
11b which is 1*2 + 1*1 = 3 would be for two bits. But a byte is 8 bits, so 2 bytes is 16 bits. The largest binary number is [2^16 - 1], which is 65535 (base ten)
65,535
Using the digits 12279, the largest number that can be represented is 97,221.
The largest unsigned integer is 26 - 1 = 63, giving the range 0 to 63; The largest signed integer is 25 - 1 = 31, giving the range -32 to 31.
Metric numbers are represented using decimal places rather than fractions usually.
65,535
674
0.9999
The largest Roman numeral number that can be made without using a bar is 3,999, which is represented by the letters MMMCMXCIX.
31 - it's binary equivalent is 11111
Bytes can be written using hexadecimal, octal or decimal notation. A numeral with no prefix is always regarded as decimal. If prefixed with a leading zero it is deemed octal and if prefixed with 0x it is deemed hexadecimal. The following shows the three ways to write the decimal value 255: 255 (decimal) 0377 (octal) 0xff (hexadecimal) Hexadecimal is the generally the most convenient method of notation since each hexadecimal digit represents exactly 4-bits (a half byte or a nybble). An octal digit represents exactly 3 bits and is useful for notating bytes in groups of 3 bits. A 24-bit integer is both a multiple of 3 and 4 so it can be notated using 8 octal digits or 6 hexadecimal digits. Individual bytes are best stored using the uint8_t alias (defined in the <cstdint> standard library header) as this guarantees an 8-bit byte in the positive range 0 to 255 decimal. To store several contiguous bytes, use a vector of uint8_t: std::vector<uint8_t> bytes; bytes.push_back (255); bytes.push_back (0377); bytes.push_back (0xff); The above example pushes the value 255 onto the back of the vector three times, using decimal, octal and hexadecimal notation. You can also write contiguous bytes in multiples of 2, 4 and 8 bytes using uint16_t, uint32_t and uint64_t aliases respectively. Thus if you need a 64-bit value, use the uint64_t alias. uint64_t word = 0xffffffffffffffff; // maximum value
The commutative property of addition applies to all real and complex numbers. It has nothing whatsoever to do with the form in which the number is represented: decimal, binary, etc.