Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

explain in detail. Assignment: For each problem, include units where appropriate. 1 . Perform the necessary base conversions to complete each row and fill in

explain in detail. Assignment:
For each problem, include units where appropriate.
1. Perform the necessary base conversions to complete each row and fill in the table. Make
sure to show the work that supports this. Note that since it is easy to get lost looking at
bit patterns, lets get in the habit of writing them in groups of four (except for the leftmost
group).
binary decimal hexadecimal
1111000
35
0xB4
2. The 1989 C standard gives minimums for the integer types. While an int must be at least
two bytes, on modern computers it is typically four bytes. This creates a portability issue.
The 1999 C standard (referred to as C99) includes the library stdint.h. This library contains
typedefs for exact-width integer types. For example, int16 t is a 16-bit signed integer in the
twos complement representation while uint32 t is a 32-bit unsigned integer.
Complete this table, using base-10 values:
number of minimum maximum
variable type bit arrangements value value
uint8 t 2560255
int8 t
uint16 t
int16 t
uint32 t
int32 t
3. Give the 8-bit, twos complement binary representation for each of these.
(a) int8 t a =510;
(b) int8 t b =1610;
(c) int8 t c =9310;
(d) int8 t d =12710;
4. For each base-10 number n below, determine the largest power of 2<= n and the minimum
number of bits needed to represent n as an unsigned integer.
n 2k <= n min bits
923=84
31
58
100
256

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions