Computer Science, asked by sanjay31san, 1 year ago

how to convert -25 into binary nu system


asish623: is 25 a decimal number

Answers

Answered by kvnmurty
3
convert 25 in to binary system and take two's complement of that.

u know how to convert 25 into binary. express it as
25 = 0 * 2^7+0  *  2^6+0 * 2^5+1 * 2^4+ 1 * 2^3+ 0 * 2^2 + 0 2^1+1 * 2^0

25 = 0001 1001

take one' complement :  1110 0110  toggle 1s and 0s

add 1 to this number :      1110 0111      this is -25




kvnmurty: when some one gives a number 56, -23 with out a radix or base - it means the default base is 10. if some one gives a number like 56 base 16, then the base is 16. understand this.
kvnmurty: is there is radix one want to specify, he can specify explicitly. if it is not specified we take a default, it is not wrong. it is right. The IDEA is HOW to represent a negative number in binary.
asish623: Ok u r telling that if we dosent write any base we need to consider it as decimal
kvnmurty: what did your teacher tell u in ur class
asish623: he dosent told any thing such all the question in my text book it is shown the base never i hav seen such
asish623: hmm thnx u a teacher?Which state district school?
Similar questions