개발자의 노트
[Delphi] Bin -> Int / Hex -> Bin 변환
소프트웨어개발/Delphi 2017. 10. 27. 16:52

설명은 따로 없습니다. 아래 코드를 참고하세요. function BinToInt(const Bin: string): Integer; var I, Len: Integer; begin Result := 0; Len := Length(Bin); for i := Len downto 1 do if Bin[I] = '1' then Result := Result + (1 shl (Len - I)); end; function HexToBin(const Hexadecimal: string): string; const BCD: array[0..15] of string = ('0000', '0001', '0010', '0011', '0100', '0101', '0110', '0111', '1000', '1001', '101..