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
Que es lo que me recomiendan estudiar? :v
trapecia [35]

Answer:

Informática O Tecnología de la información O Electrónica. Puedes hacer maravillas con estos. Puede comenzar un curso en cualquiera de las transmisiones, pero tenga en cuenta sus habilidades y considérelas al seleccionar una de las anteriores. Si quieres hacer un pequeño curso. Puedes hacer un curso de alojamiento web o computación en la nube. Pero siempre aprende un idioma aparte de estos definitivamente. Además, siga aprendiendo vocabularios de todos estos. Eso te convertirá pronto en una personalidad, que nunca se aburrirá. Lea muchos blogs y artículos sobre estos a diario también.

Explanation:

La respuesta se explica por sí misma.

5 0
3 years ago
Five corporations own over 90 percent of the media in the US.<br> 1.True<br> 2.False
avanturin [10]
<span>Five corporations own over 90 percent of the media in the US : </span>1.True.

7 0
4 years ago
8.17 Lab: Strings of a Frequency Write a program that reads whitespace delimited strings (words) and an integer (freq). Then, th
WITCHER [35]

Answer:

def wordsOfFreqency(words, freq):

 text1 = "Apple apPLE mangO aPple orange Orange apple guava Mango mango"

 words = []

 words1 = []

 words1 = text1.split()

 words = [x.upper() for x in words1]

 freq=[words.count(w) for w in words]

 print(dict(zip(freq,words)))

 return words

def main():

wordsOfFreqency(words, freq)      

if __name__=="__main__":

main()    # call main function

Explanation:

This will print the list of strings as per its word frequency.

Output is :

{4: 'APPLE', 3: 'MANGO', 2: 'ORANGE', 1: 'GUAVA'}

4 0
3 years ago
How do you keep word from trying to capitalize every isolated letter "i"
Firdavs [7]
Write "i" the write random words then delete it and add the lowercase i
8 0
3 years ago
Read 2 more answers
Which of the statements below explains why a budget is useful
Papessa [141]

The answer is D. All the other answers describe what a budget CAN be like, not necessarily what it is for everyone, if that makes sense.

8 0
3 years ago
Other questions:
  • Hydropower uses moving water to do work, such as grinding grains in a mill. True False
    7·1 answer
  • I need help <br> Match each words with its definition!!!<br> Please helpppppppp
    12·1 answer
  • we studied FIFO, Priority, Round Robin (RR), and Weighted Fair Queueing (WFQ) packet scheduling disciplines. Which of these queu
    12·1 answer
  • Arrange these steps of creating a presentation in the correct order.
    15·2 answers
  • Your program is going to compare the scores of two volleyball teams that play each other. To win a match in volleyball, a team m
    14·1 answer
  • Case Study
    15·1 answer
  • When power is completely removed from your computer
    11·1 answer
  • Tape is magnetic tape which sound ca be recorded , true or false?
    9·1 answer
  • 22. Write the following in full un computer
    5·1 answer
  • Computer networks that use packet switching are less efficient than telephone networks that use circuit switching.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!