binary calculations Flashcards
how is binary addition different from denary addition
what is overflow in binary addition
overflow occurs when the result exceeds the number of bits available, e.g., adding two 8-bit numbers gives a 9-bit result
how do you add binary values
align both numbers, start from the rightmost bit, and use binary addition rules
what is a logical shift
it moves binary digits left or right, replacing emptied bits with 0
what is two’s complement
a method to represent negative binary numbers where the msb represents -128 instead of 128
how do you convert a binary value to two’s complement
find the first 1 from the right, leave it unchanged, and flip all bits to its left
how do you convert a negative value to two’s complement
find the binary equivalent (ignore the negative sign), apply two’s complement conversion, set the msb to 1