1. Fill in the following table to show how the given integers are represented, assuming that 16 bits are used to store values and the machine used two's complement notation. Integer 28 2216 -18675 -12 31456 Binary Hex 4 Byte Big Endian (hex value as seen in memory) 4 Byte Little Endian (hex value as seen in memory)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
**Exercise 1: Two's Complement and Endianness**

**Objective:**
Fill in the following table to show how the given integers are represented, assuming that 16 bits are used to store values and the machine uses two’s complement notation.

**Table:**

| Integer | Binary | Hex | 4 Byte Big Endian (hex value as seen in memory) | 4 Byte Little Endian (hex value as seen in memory) |
|---------|--------|-----|-------------------------------------------------|----------------------------------------------------|
| 28      |        |     |                                                 |                                                    |
| 2216    |        |     |                                                 |                                                    |
| -18675  |        |     |                                                 |                                                    |
| -12     |        |     |                                                 |                                                    |
| 31456   |        |     |                                                 |                                                    |

**Instructions:**
1. Convert each integer to its 16-bit binary representation in two's complement format.
2. Convert the binary representation to hexadecimal.
3. Use the hexadecimal value to determine the big-endian and little-endian representations, assuming a 4-byte representation for each number.

**Notes:**
- **Two's Complement**: A method for representing signed integers that can accommodate both positive and negative values.
- **Endianness**:
  - **Big Endian**: Stores the most significant byte at the smallest memory address.
  - **Little Endian**: Stores the least significant byte at the smallest memory address.
Transcribed Image Text:**Exercise 1: Two's Complement and Endianness** **Objective:** Fill in the following table to show how the given integers are represented, assuming that 16 bits are used to store values and the machine uses two’s complement notation. **Table:** | Integer | Binary | Hex | 4 Byte Big Endian (hex value as seen in memory) | 4 Byte Little Endian (hex value as seen in memory) | |---------|--------|-----|-------------------------------------------------|----------------------------------------------------| | 28 | | | | | | 2216 | | | | | | -18675 | | | | | | -12 | | | | | | 31456 | | | | | **Instructions:** 1. Convert each integer to its 16-bit binary representation in two's complement format. 2. Convert the binary representation to hexadecimal. 3. Use the hexadecimal value to determine the big-endian and little-endian representations, assuming a 4-byte representation for each number. **Notes:** - **Two's Complement**: A method for representing signed integers that can accommodate both positive and negative values. - **Endianness**: - **Big Endian**: Stores the most significant byte at the smallest memory address. - **Little Endian**: Stores the least significant byte at the smallest memory address.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Random access
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education