I'm learning 2's complement conversion for positional number systems. For the most part I have only seen 2's complement for represented in 8-bits. I had a discussion with a friend who explained that for values that exceed 8-bits (>255) you would need to go to the next largest word size i.e. 16-bit followed by 32 and 64... That is all well and good, however I don't fully understand if or why I can't do 2's complement for something like a 5-bit, 21-bit, etc system.
For example, if I were to represent 0000 0001 1100 0111
as a 13-bit value I would take off some 0's xxx0 0001 1100 0111
, perform some arithmetic to find the complement, xxx1 1110 0011 0001
therefore the 13-bit 2's complement of (0 0001 1100 0111)
is (1 1110 0011 0001 0001)
? Please let me know if I am missing something...