Commit 61c35456 authored by KANTAPONG SONG-NGAM's avatar KANTAPONG SONG-NGAM

add

parent 425b8273
......@@ -4,4 +4,5 @@ def value(v,pos,neg):
return sign*sum([int(v[i])*2**(pos-i) for i in range(1,pos+neg+1)])
print(value('0001011',3,3))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment