[R] (no subject)

Paul Bernal p@u|bern@|07 @end|ng |rom gm@||@com
Mon Jan 20 15:40:43 CET 2020


Example of conversion to decimal of a signed binary number in two's
complement representation

Let's convert to decimal the following signed binary number: 10110010
10110010 = -1×27 + 0×26 + 1×25 + 1×24 + 0×23 + 0×22 + 1×21 + 0×20 = -128 +
32 + 16 + 2 = -78.

that operation ilvoves base 2 raised to the 7th, 6th, 5th, .... and 0th
power. Only the first one has a minus one multiplying. The  first one is
multiplied by a 2 raised to the seventh power because powers goe from right
to left, starting from zero, all the way to the leftmost integer.

Thank you so much for your valuable help,

Cheers,

Paul

	[[alternative HTML version deleted]]



More information about the R-help mailing list