Please explain steps1)A, B and C are 8 bit no's. They are as follows:A -> 1 1 0 0 0 1 0 1B -> 0 0 1 1 0 0 1 1C -> 0 0 1 1 1 0 1 0 ( - =minus, u=union)Find ((A - C) u B) =?2)My flight takes of at 2pm from a place at 18N 40E and landed 10 Hrs later at a place with coordinates 36N40W.What is the local time when my plane landed?

This question is related to TCS Interview

Showing Answers 1 - 9 of 9 Answers

2) the local time will be  6.40 pm because.

 the difference of coordiante is 80 degree, cuase one is 40 degree east and one is 40 degree west.

  so total time distance is 80*4=320 min means 5 hours 20 minute, if there were no chance to change the time it wiold be 12 o clock, but difference of time acording to cordinate it is 5 hours 20 minute, so time will be 12 o clock -5hours 20 min means 6.40 pm

  Was this answer useful?  Yes

sceechvocc

  • Mar 16th, 2007
 

First of all 'u' indicates "OR "operation. and secondly "subtraction " => addition of two's complement.
taking into account these two steps.
C=00111010
1's complement=11000101
2's complement=1's complement+1
                        =11000110
thus A-C => A+(2's complement of C) i.e
                    11000101+11000110
                  = 10001011  (neglecting the carry)

now (a-c)u b =>  10001011 u 00110011
                      =   10111011
                      =   187 (ans) 

2.) In these questions the north-south longitudes are of no value. What matters is only the east-west latitudes.
here the person goes from 40E to 40W,i.e a total movement of 80 degrees.
so time shift= 24*(80/360)   ( a total of 360 degrees).
                   =  5.33 hrs.

time when he started = 2pm
time taken = 10 hrs
so time of arrival = 12 am
However travelling  from east to west=> 12-5.33
                                                             =   6.27 pm (ans)


HOPE these help you
however do not believe in the answers blindly. Solve for urself

                           

  Was this answer useful?  Yes

karthi08

  • Oct 30th, 2009
 

11000101
00111010
------------------
10001011

subtract c from a using binary subtraction
we wil get the ans 10001011

then unoin means we hav to perform OR operation
10001011  (A-C)
00110011
-------------
10111011

The ans is 10111011

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions