What is the value currently stored inside of BH? Give the answer in hexadecima
Part 1: Registers of Different Sizes
Registers are fast, but small memory locations that are inside of a CPU. They are used for the CPU's internal computations. A modern 32-bit CPU only contains 8 registers that we are capable of manipulating: EAX, EBX, ECX, EDX, EBP, ESP, ESI, and EDI. Each of these is a 32-bit register (meaning they each hold 32 digit binary numbers).
There are many situations where we would want to use smaller portions of data than 32 bits. For example, when working with characters we are primarily using byte data, since each character is stored in just a single byte (which you should know is 8 bits). For this purpose, portions of the 32-bit registers can be referenced directly as if they were smaller registers.
The register EAX holds 32-bits. The register AX is the bottom half of EAX, holding just 16 bits. The register AL is the bottom half of AX, holding just 8 bits. There is also AH, which is the top half of AX and also holds 8 bits.
EBX, ECX, and EDX can also be split up in the same manner using the same naming scheme but with B, C, and D respectively. ESI, EDI, EBP, and ESP also have a 16-bit references, but do not have 8-bit references.
These different sized registers are the same locations as the larger registers! For example, when you are using BX you are actually using the bottom half of EBX. They are one and the same, just different names for different portions of the same location. If you change the value in DL, you are also changing a portion of DX and EDX.
Register Size Relationship
32-bit: | EAX | EBX | ECX | EDX | EBP | ESP | ESI | EDI | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16-bit: | AX | BX | CX | DX | BP | SP | SI | DI | ||||||||
8-bit: | AH | AL | BH | BL | CH | CL | DH | DL |
The EBX register is holding the hexadecimal value CC0521A0. Remember that every digit of hexadecimal can be converted into 4 digits of binary, so 8 hexadecimal digits corresponds to a 32-bit value.
- What is the value currently stored inside of BH? Give the answer in hexadecimal.
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)