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 Center および File ExchangeShifting and Sorting Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by