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
Write a program to generate the 1,8,27,64,125,226,343,512,729,1000 series.​
ehidna [41]

Answer:

class series

{

public static void[]

main[string args[]]

{

into, I, n=4;

for(i=1;i<=n;i++)

{

d=i*i*i;

system. out. print(d+",");

}

}

}

Explanation:

java?

4 0
3 years ago
What is the common name of computers connected in a network?
ser-zykov [4K]

Answer:

Nodes

Explanation

All of the computers and printers on the network are called nodes of the network

6 0
3 years ago
What are some benefits of 3-D printing?
Helga [31]

Faster Production.

Easily Accessible.

Better Quality.

Tangible Design and Product Testing.

Cost-effectiveness.

Creative Designs and Customization Freedom.

6 0
3 years ago
When a single physical computer runs this type of software, it operates as though it were two or more separate and independent c
Alecsey [184]

Answer:

virtualization

Explanation:

When a single physical computer runs the special type of software known as the virtualization software it allows the single physical computer to run multiple distinct operating system, making it look as though there were two or more independent and separate computers and working in an isolated fashion simultaneously.

5 0
4 years ago
A file that is embedded on the hard drive of a computer, often without a person's knowledge, that collects and stores informatio
Gnom [1K]
The correct answer would be Spyware
6 0
3 years ago
Other questions:
  • A persons decision to take action without being asked is
    9·1 answer
  • Define what is meant by an entity in a data model. How should an entity be named? What information about an entity should be sto
    5·1 answer
  • What is a detailed and thorough review of the deployed security infrastructure compared with the organization’s security policy
    5·1 answer
  • To select an unselected text object, press [____], click the text object, and then release [____].
    8·1 answer
  • An automated search feature used by search engines to find results that match your search terms is called a spider or _______. A
    15·2 answers
  • Jeremy is working with a team that is creating an application using attributes and associated methods. What type of programming
    8·1 answer
  • How do I make someone "Brainiest". <br> First person to reply will get "Brainiest"
    8·2 answers
  • Most project files will contain:
    9·1 answer
  • When first designing an app, all of the folldwing are important EXCEPT
    13·1 answer
  • Which of the following is a characteristic of vector graphics?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!