subtract 26 ( 10) from 45( 10 ) using 2s complement
Answers
Answer:
26(10) = 26*10 = 260
45(10) = 45*10 = 450
Explanation:
So write code as
x= 26*10
press enter to check if the value (260) is assigned properly
y= 45*10
press enter to check if the value (450) is assigned properly
note: it has to be written as 26*10 and 45*10 as 26(10) and 45(10) would show nothing bu error
after checking,
write code:
y-x press enter
if the next line says 190
It's correct
Code as appearing in Python:
>>> x=26*10 (Assigned value)
>>> x (Checking)
260 (Success)
>>> y=45*10 (Assigned value)
>>> y (Checking)
450 (Success)
>>> y-x (Final procedure)
190 (Final correct result)