CWAP-404 practice question 9 of 15

Protocol analyzers may present field values in either binary, decimal or hexadecimal. What preceeds a hexadecimal value to indicate it is hexadecimal?

Full set: 60 questions
Answer options
A: 0x Correct answer
B: 16x
C: %
D: HEX
Correct Answer:
A. 0x
Explanation

The prefix "0x" is the standard convention used to denote a hexadecimal (base-16) number in many programming languages, most notably C and its derivatives (C++, Java, C#). This convention has been widely adopted in computing and is used by most protocol analyzers, such as Wireshark, to represent hexadecimal values in packet decodes and display filters. This notation unambiguously distinguishes hexadecimal numbers from decimal or other numerical bases, preventing misinterpretation of data fields within a protocol frame.

Why Incorrect

B. 16x: This is not a standard or recognized prefix for hexadecimal notation in any common programming language or protocol analysis tool.
C. %: This prefix is sometimes used to denote binary (base-2) numbers in certain assembly languages or hardware description languages, not hexadecimal.
D. HEX: While "HEX" is an abbreviation for hexadecimal, it is typically used as a descriptive label or a suffix (e.g., 1AFh in some assemblers), not a prefix.

References

1. University Courseware: Massachusetts Institute of Technology (MIT) OpenCourseWare. (2017). 6.004 Computation Structures, Spring 2017. Lecture 1: The Digital Abstraction, Slide 20. Retrieved from MIT OCW, which states, "In C, we can be specific about the base of a number literal: 0b (binary), 0 (octal), 0x (hex)."

2. Official Vendor Documentation: Wireshark Foundation. (2024). Wireshark User's Guide. Chapter 6. Display Filter Expressions, Section 6.3.3. Numbers. The documentation specifies, "You can also use C-style hexadecimal integer literals (for example, 0xdeadbeef)."

3. University Courseware: University of California, Berkeley. CS 61C: Great Ideas in Computer Architecture (Machine Structures). Lecture 2: C Memory Management, Number Representation. The course materials explicitly state, "In C, 0x prefix denotes hexadecimal." This is relevant as many protocol analysis tools are written in or influenced by C.

Scroll to Top