Commit 9ecd27fe authored by KANTAPONG SONG-NGAM's avatar KANTAPONG SONG-NGAM

add

parent a50c28bc
......@@ -3,6 +3,7 @@ def value(v,pos=4,neg=3):
sign = -1 if int(v[0]) == 1 else 1
return sign*sum([int(v[i])*2**(pos-i) for i in range(1,pos+neg+1)])
def values(v,pos,neg):
sign = -1 if int(v[0]) == 1 else 1
......
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