zoukankan      html  css  js  c++  java
  • 4 bit all 15

    3
    1 0001  -1
    2 0010  -2
    8 1000  -4
    4 0100  -3
    2
    3 0011   -1 2
    5 0101   -1 3
    6 0110   -2 3
    9 1001   -1 4
    10 1010  -2 4
    12 1100  -3 4
    1
    7 0111   -1 2 3
    11 1011  -1 2 4
    13 1101  -1 3 4
    14 1110  -2 3 4
    0
    15 1111  -1 2 3 4
    
    0 0
    1 0001 -1
    3 0011 -1 2
    7 0111 -1 2 3
    15 1111- 1 2 3 4
    9 1001  -1 4
    5 0101  -1 3
    11 1011 -1 2 4
    13 1101 -1 3 4
    
    2 0010 - 2
    6 0110 -2 3
    14 1110 -2 3 4
    10 1010 - 2 4
    
    8 1000 -4
    4 0100 -3
    12 1100 -3 4
    case  4 bit
     1
     2
     3
     4
     ...
     15
    
    
    0 0
    1 0001 -1
    2 0010 - 2
    3 0011 -1 2
    4 0100 -3
    5 0101  -1 3
    6 0110 -2 3
    7 0111 -1 2 3
    8 1000 -4
    9 1001  -1 4
    10 1010 - 2 4
    11 1011 -1 2 4
    12 1100 -3 4
    13 1101 -1 3 4
    14 1110 -2 3 4
    15 1111- 1 2 3 4
    
    var
      i: integer;
      b: byte;
    begin
      i := 0;
      b := 1;
      case i of
        0: //0000
          case b of
            1: i := 1;
            2: i := 2;
            3: i := 4;
            4: i := 8;
          end;
        1://0001
          case b of
            //1:i:=1;
            2: i := 3;
            3: i := 5;
            4: i := 9;
          end;
        2://0010
          case b of
            1: i := 3;
            //2:i:=3;
            3: i := 6;
            4: i := 10;
          end;
        3://0011
          case b of
            //1:i:=3
            //2:i:=3;
            3: i := 7;
            4: i := 11;
          end;
        4://0100
          case b of
            1: i := 5;
            2: i := 6;
            //3:i:=7;
            4: i := 12;
          end;
        5://0101
          case b of
            //1:i:=5;
            2: i := 7;
            //3:i:=7;
            4: i := 13;
          end;
        6://0110
          case b of
            1: i := 7;
            //2:i:=7;
            //3:i:=7;
            4: i := 14;
          end;
        7://0111
          case b of
            //1:i:=7;
            //2:i:=7;
            //3:i:=7;
            4: i := 15;
          end;
        8://1000
          case b of
            1: i := 9;
            2: i := 10;
            3: i := 12;
            //4:i:=15;
          end;
        9://1001
          case b of
            //1:i:=7
            2: i := 11;
            3: i := 13;
            //4:i:=15;
          end;
        10://1010
          case b of
            1: i := 11;
            //2:i:=7;
            3: i := 14;
            //4:i:=15;
          end;
        11://1011
          case b of
            //1:i:=7
            //2:i:=7;
            3: i := 15;
            //4:i:=15;
          end;
        12://1100
          case b of
            1: i := 13;
            2: i := 14;
            //3:i:=7;
            //4:i:=15;
          end;
        13://1101
          case b of
            //1:i:=13;
            2: i := 15;
            //3:i:=7;
            //4:i:=15;
          end;
        14://1110
          case b of
            1: i := 15;
            //2:i:=14;
            //3:i:=7;
            //4:i:=15;
          end;
        15: ;//1111
      end;
    end;  
    

    https://www.onlinegdb.com/online_pascal_compiler
    https://rextester.com/l/pascal_online_compiler
    在线编译

    var
      i: integer;
      b: byte;
    begin
      i := 0;
      b := 1;
      case i of
        0: //0000
          case b of
            1: i := 1;
            2: i := 2;
            3: i := 4;
            4: i := 8;
          end;
        1://0001
          case b of  //1
            //1:i:=1;
            2: i := 3;
            3: i := 5;
            4: i := 9;
          end;
        2://0010
          case b of  //2
            1: i := 3;
            //2:i:=3;
            3: i := 6;
            4: i := 10;
          end;
        3://0011
          case b of  //1 2
            //1:i:=3
            //2:i:=3;
            3: i := 7;
            4: i := 11;
          end;
        4://0100
          case b of // 3
            1: i := 5;
            2: i := 6;
            //3:i:=7;
            4: i := 12;
          end;
        5://0101
          case b of   // 1 3
            //1:i:=5;
            2: i := 7;
            //3:i:=7;
            4: i := 13;
          end;
        6://0110
          case b of  // 2 3
            1: i := 7;
            //2:i:=7;
            //3:i:=7;
            4: i := 14;
          end;
        7://0111
          case b of   //1 2 3
            //1:i:=7;
            //2:i:=7;
            //3:i:=7;
            4: i := 15;
          end;
        8://1000
          case b of  // 4
            1: i := 9;
            2: i := 10;
            3: i := 12;
            //4:i:=15;
          end;
        9://1001
          case b of // 1 4
            //1:i:=7
            2: i := 11;
            3: i := 13;
            //4:i:=15;
          end;
        10://1010
          case b of // 2 4
            1: i := 11;
            //2:i:=7;
            3: i := 14;
            //4:i:=15;
          end;
        11://1011
          case b of  // 1 2 4
            //1:i:=7
            //2:i:=7;
            3: i := 15;
            //4:i:=15;
          end;
        12://1100
          case b of  // 3 4
            1: i := 13;
            2: i := 14;
            //3:i:=7;
            //4:i:=15;
          end;
        13://1101
          case b of  // 1 3 4
            //1:i:=13;
            2: i := 15;
            //3:i:=7;
            //4:i:=15;
          end;
        14://1110
          case b of // 2 3 4
            1: i := 15;
            //2:i:=14;
            //3:i:=7;
            //4:i:=15;
          end;
        15: ;//1111  //1 2 3 4
      end;
      ShowMessage(IntToStr(i));
    end; 
    

    可用

    var
      i: integer;
      b: byte;
    begin
      i := 0;
      b := 1;
      case i of
        0: //0000
          case b of
            1: i := 1;
            2: i := 2;
            3: i := 4;
            4: i := 8;
          end;
        1://0001
          case b of  //可用2 3 4
            //1:i:=1;
            2: i := 3;
            3: i := 5;
            4: i := 9;
          end;
        2://0010
          case b of  //可用 1 3 4
            1: i := 3;
            //2:i:=3;
            3: i := 6;
            4: i := 10;
          end;
        3://0011
          case b of  //可用 3 4
            //1:i:=3
            //2:i:=3;
            3: i := 7;
            4: i := 11;
          end;
        4://0100
          case b of // 可用 1 2 4
            1: i := 5;
            2: i := 6;
            //3:i:=7;
            4: i := 12;
          end;
        5://0101
          case b of   // 可用 2 4
            //1:i:=5;
            2: i := 7;
            //3:i:=7;
            4: i := 13;
          end;
        6://0110
          case b of  //可用 1 4
            1: i := 7;
            //2:i:=7;
            //3:i:=7;
            4: i := 14;
          end;
        7://0111
          case b of   //可用 4
            //1:i:=7;
            //2:i:=7;
            //3:i:=7;
            4: i := 15;
          end;
        8://1000
          case b of  //可用 1 2 3
            1: i := 9;
            2: i := 10;
            3: i := 12;
            //4:i:=15;
          end;
        9://1001
          case b of // 可用 2 3
            //1:i:=7
            2: i := 11;
            3: i := 13;
            //4:i:=15;
          end;
        10://1010
          case b of // 可用 1 3
            1: i := 11;
            //2:i:=7;
            3: i := 14;
            //4:i:=15;
          end;
        11://1011
          case b of  //可用 3
            //1:i:=7
            //2:i:=7;
            3: i := 15;
            //4:i:=15;
          end;
        12://1100
          case b of  //可用 1 2
            1: i := 13;
            2: i := 14;
            //3:i:=7;
            //4:i:=15;
          end;
        13://1101
          case b of  // 可用 2
            //1:i:=13;
            2: i := 15;
            //3:i:=7;
            //4:i:=15;
          end;
        14://1110
          case b of // 可用 1
            1: i := 15;
            //2:i:=14;
            //3:i:=7;
            //4:i:=15;
          end;
        15: ;//1111 可用无 //1 2 3 4
      end;
      ShowMessage(IntToStr(i));
    end;  
    
  • 相关阅读:
    由1433端口入侵,浅谈sqlserver安全 (转)
    使用 Aircrack-ng 破解 WEP 和 WPA/WPA2 加密的 Wi-Fi 密码。(转)
    ZZmsvcprt.lib(MSVCP90.dll) : error LNK2005:已经在libcpmtd.lib(xmutex.obj) 中定义 .的分析解决办法 (转)
    提高D3js力导向图加载速度(转)
    Asp.Net实现FORM认证的一些使用技巧(转)
    Windows Server 2008 R2 备份和恢复 (转)
    搭建Go开发及调试环境(LiteIDE + GoClipse) -- Windows篇
    Beego源码分析(转)
    go语言实现一个简单的登录注册web小程序
    从无线安全到内网渗透(转)
  • 原文地址:https://www.cnblogs.com/marklove/p/14803348.html
Copyright © 2011-2022 走看看