The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+18 votes
1.5k views

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

  1. $(135103.412)_o$
  2. $(564411.412)_o$
  3. $(564411.205)_o$
  4. $(135103.205)_o$
in Digital Logic by Boss (16.3k points) | 1.5k views

2 Answers

+31 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$
by Veteran (421k points)
edited by
0
sir, what is base o ?
0
4th octet , 3rd bit from left is 1-1 = 0 right ?

how 1 ?
0
It is subtraction - you must start from right end and apply necessary "borrow".
+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
+2
It is not 1-1 but 0-1 due to borrow.
+1
:O i dint know subtraction properly

 

thank you :)
+3

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 

 

0
Can any one explain how fractional part of hexadecimal is converted to binary... I mean how (.25)H is converted to (.00100101)B
0
I was doing by taking 1's comp, but ans was not right
+6 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 5H= 1011 1010 0100 0011. 1000 0101 = 001 011 101 001 000 011. 100 001 010 = (135103.412)o

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

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

and 18 - A(or 10) = 8

by (407 points)
0
i think this one is faster than converting first to binary..right
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,376 questions
55,836 answers
192,558 comments
91,335 users