Jump to content
  • Hello visitors, welcome to the Hacker World Forum!

    Red Team 1949  (formerly CHT Attack and Defense Team) In this rapidly changing Internet era, we maintain our original intention and create the best community to jointly exchange network technologies. You can obtain hacker attack and defense skills and knowledge in the forum, or you can join our Telegram communication group to discuss and communicate in real time. All kinds of advertisements are prohibited in the forum. Please register as a registered user to check our usage and privacy policy. Thank you for your cooperation.

    TheHackerWorld Official

python 进制转化



Recommended Posts

  • 计算机中底层所有的数据都是以 010101的形式存在(图片、文本、视频等)。


    v1 = bin(25) # 十进制转换为二进制
    print(v1) # "0b11001"

    v2 = oct(23) # 十进制转换为八进制
    print(v2) # "0o27"

    v3 = hex(28) # 十进制转换为十六进制
    print(v3) # "0x1c"



    i1 = int("0b11001",base=2) # 25

    i2 = int("0o27",base=8) # 23

    i3 = int("0x1c",base=16) # 28

Link to post
Link to comment
Share on other sites


discussion group

discussion group

    You don't have permission to chat.
    • Recently Browsing   0 members

      • No registered users viewing this page.
    • Create New...