How to Permute the positions of the last two nibbles of a number. In other words, a block
1
Expert's answer
2016-02-25T00:00:54-0500
x=int(input()) x=list(bin(x)[2:])
x_change=[] x_finish=[]
if len(x)<8 : x_change = [ '0' for i in range (8-len(x))] for i in range(len(x)): x_change.append(x[i]) else : x_change=x
if len(x_change)==8 : for i in range(4,8): x_finish.append(x_change[i]) for i in range(4): x_finish.append(x_change[i]) else: for i in range(len(x_change)-8): x_finish.append(x_change[i]) for i in range(len(x_change)-4,len(x_change)): x_finish.append(x_change[i]) for i in range(len(x_change)-8,len(x_change)-4): x_finish.append(x_change[i])
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment