Shifting a 64 bit hex

조회 수: 7 (최근 30일)
Adarsh Santhosh
Adarsh Santhosh 2018년 1월 24일
댓글: Adarsh Santhosh 2018년 1월 24일
First I enter a string and convert it to binary using hex2dec and dec2bin.
But I can't shift using bitshift because of error must be numeric.
I can't shift with dec also.It gives altogether a different answer.
I want to right logical shift, 92f09952c625e3e9 by 1 and should get
49784ca96312f1f4.
Can anyone please help me?

채택된 답변

Walter Roberson
Walter Roberson 2018년 1월 24일
S = '92f09952c625e3e9';
sprintf('%lx', bitshift(sscanf(, '%lx'), -1) )
  댓글 수: 1
Adarsh Santhosh
Adarsh Santhosh 2018년 1월 24일

Got it thank you very much.

S was missing.Did u do that on purpose?
Coz someone did that to me before too.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by