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]
3 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]3 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
Which term refers to the capability of a switch to copy data from any or all physical ports on a switch to a single physical por
pantera1 [17]

Answer:

The correct answer to the following question will be "Port mirroring".

Explanation:

A network traffic analysis tool, recognized as the Port Mirroring.

  • Also known as the Switch port analyzer.
  • The switch transfers a replica among all networking transmissions viewed on one port (or even a whole VLAN) to the next port, wherein the packet could be evaluated, through port mirroring disabled.

Therefore, Port mirroring is the right answer.

3 0
3 years ago
Who invented computer ?​
liraira [26]

Answer:

Charles Babbage invented computer.

hope this helps!

8 0
2 years ago
Read 2 more answers
Wow that funny a heck
lorasvet [3.4K]

Answer:

Seriously??? Omg - Orange Trump!!

3 0
2 years ago
While researching ideas for cutting energy costs is his company. Hector watches an online video in which a business expert says,
Nataliya [291]
B. Put it in quotes if it is directly quoted as is and cite the source. You should likely also list the source in the works cited but not the phrase itself.
6 0
2 years ago
Read 2 more answers
Plllzzzzzzzzzzzzzz annnssswweeweerrr...
s2008m [1.1K]

Answer:

An example of effective communication is when the person who you are talking to listens actively and absorbs your point and understands it.

Explanation:

Hope this helps!!

3 0
3 years ago
Other questions:
  • Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks a
    12·1 answer
  • An OR function nested in an IF function results in
    11·1 answer
  • When planning the structure of a spreadsheet, columns are for _______ items and rows are for _______ items.
    5·2 answers
  • How is the EF​ computed? A. ES​ + Activity time B. LF minusActivity time C. ​Min{LS of all immediate following​ activities} D. ​
    11·1 answer
  • PLEASE HELP!!!!
    7·1 answer
  • In Word, a red wavy underline indicates a/an
    15·1 answer
  • Microcomputers, different from those giant mainframes and supercomputers, are designed for individuals. In fact, the microcomput
    7·1 answer
  • What is the importance of effectiveness in communication?
    14·1 answer
  • In the year, , the American Department of Defense put a military research network, called ARPANET online.
    5·1 answer
  • Consider the following code using the posix pthreads api:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!