8个字节按位转 [英] Bitwise transpose of 8 bytes

查看:122
本文介绍了8个字节按位转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找C的一个有效的算法来按位转8个字节的数据。我的意思与此的是,如果我有8个字节是这样的:

I am looking for an efficient algorithm in C to bitwise-transpose 8 bytes of data. What I mean with this is that if I have 8 bytes like this:

00011100
00111000
00000001
00000000
11000000
00000000
11111111
01010101

我想获得以下8个字节:

I want to get the following 8 bytes:

00001010
00001011
01000010
11000011
11000010
10000011
00000010
00100011

和,因为我想用这个嵌入式平台上,应该尽可能地快: - )

And since I want to use this on an embedded platform, it should be as fast as possible :-)

所有的想法都是多少AP preciated!

All ideas are much appreciated!

推荐答案

请参阅Hacker's喜悦,7-3章。

这篇关于8个字节按位转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆