juzhen2(1) = (juzhen1(1) And &H80) + (juzhen1(2) And &H80) / 2 + (juzhen1(3) And &H80) / 4 + (juzhen1(4) And &H80) / 8 + (juzhen1(5) And &H80) / 16 + (juzhen1(6) And &H80) / 32 + (juzhen1(7) And &H80) / 64 + (juzhen1(8) And &H80) / 128
 其中 byte[] juzhen1 = new byte[8];
      byte[] juzhen2 = new byte[8];
  "&H80" 代表什么数? 请高手帮帮忙 小弟谢谢你了 !!急啊 

解决方案 »

  1.   

    最近怎么这种帖子特别多。编译过去再用Reflector反编译回来, 一复制一粘贴就好了。
      

  2.   

                byte[] juzhen1 = new byte[8];
                byte[] juzhen2 = new byte[8];
                byte b1 = 0x80;
                for(int i=1;i<=8;i++)
                {
                    juzhen2[1] += (juzhen1[i] & b1) / System.Math.Pow(2, i - 1);
                }
      

  3.   

    有错误 错误提示是“无法选择类型double隐式装换成byte,存在一个显式装换(是否缺少转换)”,请问一下 这样的改法,是我给的那句的意思吗 有点不懂!!!
      

  4.   

                byte[] juzhen1 = new byte[9];
                byte[] juzhen2 = new byte[9];
                byte b1 = 0x80;
                for(int i=1;i<=8;i++)
                {
                    byte b2=(byte)System.Math.Pow(2, i - 1);
                    juzhen2[1] += (byte)((juzhen1[i] & b1) / b2);
                }
    意思是一样的,你可以测试一下结果。
    忘了类型转换了。
      

  5.   

    高手 有QQ吗 我的QQ是517785933 我们可以QQ聊吗 谢谢了