The Gateway to Computer Science Excellence

+34 votes

Best answer

$(C012.25)_H - (10111001110.101)_B $

$= 1100\;0000\;0001\;0010.\;0010\;0101$

$- 0000\;0101\;1100\;1110.\;1010\;0000$

$= 1011\;1010\;0100\;0011.\;1000\;0101$

$= 1\;011\;101\;001\;000\;011 .\;100\;001\;010$

$= (135103.412)_o$

Binary subtraction is like decimal subtraction:$ 0-0 = 0, 1-1 = 0, 1-0 = 1, 0-1 = 1$ with $1$ borrow.

Correct Answer: $A$

$= 1100\;0000\;0001\;0010.\;0010\;0101$

$- 0000\;0101\;1100\;1110.\;1010\;0000$

$= 1011\;1010\;0100\;0011.\;1000\;0101$

$= 1\;011\;101\;001\;000\;011 .\;100\;001\;010$

$= (135103.412)_o$

Binary subtraction is like decimal subtraction:$ 0-0 = 0, 1-1 = 0, 1-0 = 1, 0-1 = 1$ with $1$ borrow.

Correct Answer: $A$

+1

@arjun Sir

1

1100 0000 0001 0010. 0010 0101

0000 0101 1100 1110. 1010 0000

0 1 1

Sir here the number after decimal point is (0-1) which will give 1 and borrow of 1

then (1-0) = 1

so next digits are (1-1) = 0 na ?

where am i going wrong

1

1100 0000 0001 0010. 0010 0101

0000 0101 1100 1110. 1010 0000

0 1 1

Sir here the number after decimal point is (0-1) which will give 1 and borrow of 1

then (1-0) = 1

so next digits are (1-1) = 0 na ?

where am i going wrong

+5

If someone is having difficulty like me with subtraction, carry & borrow we can use 2's complement method

0000 0101 1100 1110. 1010 0000

1111 1010 0011 0001. 0101 1111 (1's compliment)

Now in this we don't add 1 but we add 0.0000 0001 ref https://stackoverflow.com/questions/21367400/subtraction-of-binary-fractions-using-2s-complement

1111 1010 0011 0001. 0110 0000

Now add this with first number you will get same answer as above

+10 votes

Another way:

convert the binary in hexadecimal,

0101 1100 1110.1010 = (5CE.A)_{H}

Now we'll do hexadecimal subtraction,

C 0 1 2. 2 5

- 0 5 C E. A 0

-------------------

B A 4 3. 8 5_{H}= 1011 1010 0100 0011. 1000 0101 = 001 011 101 001 000 011. 100 001 010 = (135103.412)_{o}

-------------------

Note: when 2_{H }borrow, it becomes (2+16) = 18 in decimal = 12_{H}

and 18 - A(or 10) = 8

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.6k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.5k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,833 questions

57,719 answers

199,440 comments

107,766 users