1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
pickupchik [31]
4 years ago
9

1. An integer in C (int) is represented by 4 bytes (1 byte = 8 bits). Find the largest integer that can be handled by C. Verify

that number by computer (try to printf that number, and printf that number +1). No programming is required for this. Hint: (a) Conversion from binary to decimal: 3 2 1 0 2 1101 =1 2 + 0 2 +1 2 +1 2 = 8 + 0 + 2 +1 10 =11 (b) If an integer is represented by 1 byte (8 bits), the maximum integer number is 1111111 (Seven 1's as one bit must be reserved for a sign). 6 5 0 2 1111111 =1 2 +1 2 ++1 2 1 2 1 7 =  − =128 −1 (c) The number looks like a telephone number in Dallas.
Computers and Technology
1 answer:
faust18 [17]4 years ago
4 0

Answer:

Check the explanation

Explanation:

In C, int requires 4 butes to sotre a integer number. that means it requires 4*8 = 32 bits. The maximum number can be stored using 32 bits is

(11111111111111111111111111111111)_2

The first digit is used for sign. decimal equivalent to this number can be computed as

(1111111111111111111111111111111)_2= 1\times2^{30}+1\times2^{29}+...+1\times2^0

=1\times2^{31}-1

= 2147483647-1=2147483646

That means int can store a up to 2147483646.

                      Testing with C code

#include<stdio.h>

int main()

{

  int a = 2147483647; // a with max number

  printf("%d\n",a);// printing max number

  a = a+1;// adding one to the number

  printf("%d\n",a);// printing the number after adding one

  return 0;

}

                THE OUTPUT

$ ./a.out

2147483647

-2147483648

You might be interested in
En la historia del Computador porque se caracteriza la primera generación? *
Nadusha1986 [10]

D. Por el uso de tubos de vacio.

8 0
3 years ago
Ethan is responsible for writing the dialogue in a movie. Which role is he playing? Ethan is playing the role of a(n).....''BLAN
iVinArrow [24]
Screenwriter! A screenwriter's role is to pen the script for a film.
3 0
3 years ago
One benefit for a small business using the hosted software model for its enterprise software is that it can succeed without ____
Simora [160]

Answer:

One benefit for a small business using the hosted software model for its enterprise software is that it can succeed without employing full-time IT professionals.

Explanation:

7 0
2 years ago
Why would advertising be more important in a magazine publishing than it is in a newspaper?
Bond [772]
Newspapers are irrelevant now, magazines will get you much more viewers.
3 0
3 years ago
Read 2 more answers
You are configuring a RAID drive for a Media Streaming Server. Your primary concern is the speed of delivery of the data. This s
babymother [125]

Answer:

Raid 0

Explanation:

Raid 0 is a configuration used for speed priority. Datas are stored differently on each disk

3 0
2 years ago
Other questions:
  • Please help with this
    5·2 answers
  • The inability of BAE Automated Systems to create an automated baggage handling system led to a significant delay in the opening
    10·1 answer
  • What is hyper transport
    10·1 answer
  • Speed is how fast an object moves a certain distance within a length of time. How is speed calculated?
    14·2 answers
  • Supports traditional transactional processing for day-to-day front-office operations or systems that deal directly with the cust
    11·1 answer
  • What is the maximum amount of memory that vmachine1 can use in its current configuration with startup ram set to 1024 megabytes?
    14·1 answer
  • Which of the following is one of the options available on the Columns menu on the
    6·1 answer
  • Ranboo back story? (not homework i just wanna find some ppl who are interested in the same things) ft. the reddie meme
    9·2 answers
  • What are the disadvantages of vector images when compared to bitmap images?
    14·1 answer
  • Write the importance of program in computer​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!