V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
huangya
V2EX  ›  OpenAI

为什么 chatgpt 连 16 进制转二进制都会搞错?

  •  1
     
  •   huangya · 135 天前 · 1693 次点击
    这是一个创建于 135 天前的主题,其中的信息可能已经有所发展或是发生改变。

    问题很简单,就是想让它帮我解析一个寄存器的各个 bit 代表的含义。这个寄存器读出来是 16 进制的。它需要转换成二进制。根据公开的 ieee 标准每个 bit 都有特定的含义。但是它转换成二进制的时候,总是会弄错。比如 bit2 是 1 ,它理解成 0.是我的提问方式不对吗?还是选择的模型不对?我用的是 gpt-4o 。请大家指点一下。

    Parsing Ethernet PHY status register

    Message From You:

    get the value of ethernet phy register 1(status register). Its value is 0x796d. Please help me parse the value

    Message From ChatGPT:

    Certainly! The value of the Ethernet PHY status register (register 1) is 0x796d. To parse this value, we need to understand the typical bit definitions for this register. The exact bit definitions can vary depending on the specific PHY chip, but I'll provide a common example based on the IEEE 802.3 standard for PHY status registers.

    The common bit definitions for the status register (register 1) are:

    • Bit 15: 100BASE-T4 Capable
    • Bit 14: 100BASE-X Full Duplex Capable
    • Bit 13: 100BASE-X Half Duplex Capable
    • Bit 12: 10 Mbps Full Duplex Capable
    • Bit 11: 10 Mbps Half Duplex Capable
    • Bit 10: 100BASE-T2 Full Duplex Capable
    • Bit 9: 100BASE-T2 Half Duplex Capable
    • Bit 8: Extended Status
    • Bit 7: Unidirectional Enable
    • Bit 6: MF Preamble Suppression
    • Bit 5: Auto-Negotiation Complete
    • Bit 4: Remote Fault
    • Bit 3: Auto-Negotiation Ability
    • Bit 2: Link Status
    • Bit 1: Jabber Detect
    • Bit 0: Extended Capability

    Given the value 0x796d, let's convert it to binary:

    0x796d = 0b0111100101101101

    Now, let's map this binary value to the status register bits:

    • Bit 15: 0 (100BASE-T4 Capable: No)
    • Bit 14: 1 (100BASE-X Full Duplex Capable: Yes)
    • Bit 13: 1 (100BASE-X Half Duplex Capable: Yes)
    • Bit 12: 1 (10 Mbps Full Duplex Capable: Yes)
    • Bit 11: 0 (10 Mbps Half Duplex Capable: No)
    • Bit 10: 0 (100BASE-T2 Full Duplex Capable: No)
    • Bit 9: 1 (100BASE-T2 Half Duplex Capable: Yes)
    • Bit 8: 0 (Extended Status: No)
    • Bit 7: 1 (Unidirectional Enable: Yes)
    • Bit 6: 1 (MF Preamble Suppression: Yes)
    • Bit 5: 0 (Auto-Negotiation Complete: No)
    • Bit 4: 1 (Remote Fault: Yes)
    • Bit 3: 1 (Auto-Negotiation Ability: Yes)
    • Bit 2: 0 (Link Status: No)
    • Bit 1: 1 (Jabber Detect: Yes)
    • Bit 0: 1 (Extended Capability: Yes)

    So, the parsed values are:

    • 100BASE-T4 Capable: No
    • 100BASE-X Full Duplex Capable: Yes
    • 100BASE-X Half Duplex Capable: Yes
    • 10 Mbps Full Duplex Capable: Yes
    • 10 Mbps Half Duplex Capable: No
    • 100BASE-T2 Full Duplex Capable: No
    • 100BASE-T2 Half Duplex Capable: Yes
    • Extended Status: No
    • Unidirectional Enable: Yes
    • MF Preamble Suppression: Yes
    • Auto-Negotiation Complete: No
    • Remote Fault: Yes
    • Auto-Negotiation Ability: Yes
    • Link Status: No
    • Jabber Detect: Yes
    • Extended Capability: Yes

    Note that these interpretations are based on a common definition of the status register. For exact bit definitions, you should refer to the datasheet of the specific PHY chip you are using.

    Message From You:

    Bit 2 is 1 ,why you say is 0. Please check again

    Message From ChatGPT:

    I apologize for the oversight. Let's re-evaluate the binary representation of the value 0x796d and correctly interpret bit 2.

    The hexadecimal value 0x796d converts to binary as follows:

    0x796d = 0b0111100101101101

    Now, let's break down the binary value into individual bits:

    • Bit 15: 0
    • Bit 14: 1
    • Bit 13: 1
    • Bit 12: 1
    • Bit 11: 1
    • Bit 10: 0
    • Bit 9: 0
    • Bit 8: 1
    • Bit 7: 1
    • Bit 6: 0
    • Bit 5: 1
    • Bit 4: 1
    • Bit 3: 0
    • Bit 2: 1
    • Bit 1: 0
    • Bit 0: 1

    So, the corrected bit values are:

    • Bit 15: 0 (100BASE-T4 Capable: No)
    • Bit 14: 1 (100BASE-X Full Duplex Capable: Yes)
    • Bit 13: 1 (100BASE-X Half Duplex Capable: Yes)
    • Bit 12: 1 (10 Mbps Full Duplex Capable: Yes)
    • Bit 11: 1 (10 Mbps Half Duplex Capable: Yes)
    • Bit 10: 0 (100BASE-T2 Full Duplex Capable: No)
    • Bit 9: 0 (100BASE-T2 Half Duplex Capable: No)
    • Bit 8: 1 (Extended Status: Yes)
    • Bit 7: 1 (Unidirectional Enable: Yes)
    • Bit 6: 0 (MF Preamble Suppression: No)
    • Bit 5: 1 (Auto-Negotiation Complete: Yes)
    • Bit 4: 1 (Remote Fault: Yes)
    • Bit 3: 0 (Auto-Negotiation Ability: No)
    • Bit 2: 1 (Link Status: Yes)
    • Bit 1: 0 (Jabber Detect: No)
    • Bit 0: 1 (Extended Capability: Yes)

    So, the parsed values are:

    • 100BASE-T4 Capable: No
    • 100BASE-X Full Duplex Capable: Yes
    • 100BASE-X Half Duplex Capable: Yes
    • 10 Mbps Full Duplex Capable: Yes
    • 10 Mbps Half Duplex Capable: Yes
    • 100BASE-T2 Full Duplex Capable: No
    • 100BASE-T2 Half Duplex Capable: No
    • Extended Status: Yes
    • Unidirectional Enable: Yes
    • MF Preamble Suppression: No
    • Auto-Negotiation Complete: Yes
    • Remote Fault: Yes
    • Auto-Negotiation Ability: No
    • Link Status: Yes
    • Jabber Detect: No
    • Extended Capability: Yes

    Thank you for pointing out the mistake.

    Message From You:

    Bit 3 is also wrong. It's 1, not 0

    Message From ChatGPT:

    You're correct. Let's re-evaluate the binary representation of 0x796d and correctly interpret the bits.

    The hexadecimal value 0x796d converts to binary as follows:

    0x796d = 0b0111100101101101

    Breaking down the binary value into individual bits:

    • Bit 15: 0
    • Bit 14: 1
    • Bit 13: 1
    • Bit 12: 1
    • Bit 11: 1
    • Bit 10: 0
    • Bit 9: 0
    • Bit 8: 1
    • Bit 7: 1
    • Bit 6: 0
    • Bit 5: 1
    • Bit 4: 1
    • Bit 3: 1
    • Bit 2: 1
    • Bit 1: 0
    • Bit 0: 1

    So, the corrected bit values are:

    • Bit 15: 0 (100BASE-T4 Capable: No)
    • Bit 14: 1 (100BASE-X Full Duplex Capable: Yes)
    • Bit 13: 1 (100BASE-X Half Duplex Capable: Yes)
    • Bit 12: 1 (10 Mbps Full Duplex Capable: Yes)
    • Bit 11: 1 (10 Mbps Half Duplex Capable: Yes)
    • Bit 10: 0 (100BASE-T2 Full Duplex Capable: No)
    • Bit 9: 0 (100BASE-T2 Half Duplex Capable: No)
    • Bit 8: 1 (Extended Status: Yes)
    • Bit 7: 1 (Unidirectional Enable: Yes)
    • Bit 6: 0 (MF Preamble Suppression: No)
    • Bit 5: 1 (Auto-Negotiation Complete: Yes)
    • Bit 4: 1 (Remote Fault: Yes)
    • Bit 3: 1 (Auto-Negotiation Ability: Yes)
    • Bit 2: 1 (Link Status: Yes)
    • Bit 1: 0 (Jabber Detect: No)
    • Bit 0: 1 (Extended Capability: Yes)

    So, the parsed values are:

    • 100BASE-T4 Capable: No
    • 100BASE-X Full Duplex Capable: Yes
    • 100BASE-X Half Duplex Capable: Yes
    • 10 Mbps Full Duplex Capable: Yes
    • 10 Mbps Half Duplex Capable: Yes
    • 100BASE-T2 Full Duplex Capable: No
    • 100BASE-T2 Half Duplex Capable: No
    • Extended Status: Yes
    • Unidirectional Enable: Yes
    • MF Preamble Suppression: No
    • Auto-Negotiation Complete: Yes
    • Remote Fault: Yes
    • Auto-Negotiation Ability: Yes
    • Link Status: Yes
    • Jabber Detect: No
    • Extended Capability: Yes

    Thank you for pointing out the mistake.

    Message From You:

    I'm afraid bit 7 is also wrong. It should be 0 instead of 1

    Message From ChatGPT:

    Let's carefully re-evaluate the binary representation of 0x796d and correctly interpret the bits.

    The hexadecimal value 0x796d converts to binary as follows:

    0x796d = 0b0111100101101101

    Breaking down the binary value into individual bits:

    • Bit 15: 0
    • Bit 14: 1
    • Bit 13: 1
    • Bit 12: 1
    • Bit 11: 1
    • Bit 10: 0
    • Bit 9: 0
    • Bit 8: 1
    • Bit 7: 0
    • Bit 6: 1
    • Bit 5: 1
    • Bit 4: 0
    • Bit 3: 1
    • Bit 2: 1
    • Bit 1: 0
    • Bit 0: 1

    So, the corrected bit values are:

    • Bit 15: 0 (100BASE-T4 Capable: No)
    • Bit 14: 1 (100BASE-X Full Duplex Capable: Yes)
    • Bit 13: 1 (100BASE-X Half Duplex Capable: Yes)
    • Bit 12: 1 (10 Mbps Full Duplex Capable: Yes)
    • Bit 11: 1 (10 Mbps Half Duplex Capable: Yes)
    • Bit 10: 0 (100BASE-T2 Full Duplex Capable: No)
    • Bit 9: 0 (100BASE-T2 Half Duplex Capable: No)
    • Bit 8: 1 (Extended Status: Yes)
    • Bit 7: 0 (Unidirectional Enable: No)
    • Bit 6: 1 (MF Preamble Suppression: Yes)
    • Bit 5: 1 (Auto-Negotiation Complete: Yes)
    • Bit 4: 0 (Remote Fault: No)
    • Bit 3: 1 (Auto-Negotiation Ability: Yes)
    • Bit 2: 1 (Link Status: Yes)
    • Bit 1: 0 (Jabber Detect: No)
    • Bit 0: 1 (Extended Capability: Yes)

    So, the parsed values are:

    • 100BASE-T4 Capable: No
    • 100BASE-X Full Duplex Capable: Yes
    • 100BASE-X Half Duplex Capable: Yes
    • 10 Mbps Full Duplex Capable: Yes
    • 10 Mbps Half Duplex Capable: Yes
    • 100BASE-T2 Full Duplex Capable: No
    • 100BASE-T2 Half Duplex Capable: No
    • Extended Status: Yes
    • Unidirectional Enable: No
    • MF Preamble Suppression: Yes
    • Auto-Negotiation Complete: Yes
    • Remote Fault: No
    • Auto-Negotiation Ability: Yes
    • Link Status: Yes
    • Jabber Detect: No
    • Extended Capability: Yes

    Thank you for pointing out the corrections.

    14 条回复    2024-08-02 16:05:25 +08:00
    love060701
        1
    love060701  
       135 天前   ❤️ 1
    LLM 不擅长逻辑计算,你这种场景,不如让 ChatGPT 给你写个脚本更有效
    TabGre
        2
    TabGre  
       135 天前 via iPhone
    或许因为你不懂 LLM ? dog:)
    cwxiaos
        3
    cwxiaos  
       135 天前 via iPhone   ❤️ 1
    llm 是序列预测啊,本质上就是成语接龙,不借助其它技术没啥计算能力
    shyangs
        4
    shyangs  
       135 天前
    LLM 不擅長邏輯計算,但可以寫腳本。這表示寫腳本的機器人可以不擅長邏輯計算。
    lDqe4OE6iOEUQNM7
        5
    lDqe4OE6iOEUQNM7  
       135 天前
    @huangya 他不是计算器呀,聊天模型,聊天懂吗?,随机最大概率回复你就行,不保准的
    huangya
        6
    huangya  
    OP
       135 天前
    @love060701
    @TabGre
    @cwxiaos
    @shyangs
    @James2099
    我还真不知道不擅长计算,感谢点拨。
    shyangs
        7
    shyangs  
       135 天前
    @huangya

    其實 LLM 也不擅長寫腳本, 因為它不擅長邏輯計算.

    它只是複讀機, 把別人寫過的腳本複讀出來, 讓人覺得它會寫腳本.
    foolLi
        8
    foolLi  
       135 天前
    你叫它使用代码和相关计算工具给你做,它就会调用工具或写代码做,正确性就高了
    Ericcccccccc
        9
    Ericcccccccc  
       135 天前
    语言模型适合写作文,不适合做算数

    简单来讲,chatgpt 这类东西是看完了一千万本书,然后建立了 x 后面应该是 y1 还是 y2 的预测模型

    现在拿着 1+2=? 问它,它发现 3 这个字符是概率最大的

    但更复杂的算数场景它未必能正确预测出正确的下个字符
    villivateur
        10
    villivateur  
       135 天前
    因为 GPT 只适合做文科,搞不来理科
    coolfan
        11
    coolfan  
       134 天前
    就像你心算 843751*9437 也算,拟人
    cvbnt
        12
    cvbnt  
       134 天前
    数学方面,你可以试试 Wolfram GPT
    maymay5
        13
    maymay5  
       131 天前
    base64 转码都有可能错
    huangya
        14
    huangya  
    OP
       114 天前
    @cvbnt 今天我问了相同的问题,Wolfram GPT 也没有完全算对。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2754 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:16 · PVG 16:16 · LAX 00:16 · JFK 03:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.