Java: Intro. to Prob. Solv... (Looseleaf)
7th Edition
ISBN: 9780133841084
Author: SAVITCH
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 1, Problem 11E
Program Plan Intro
a)
Determining the values represented by bits:
Single bits can represent two values 0 and 1. Two digits can represent 4 values and three digits can represent 8 values. These values could be determined by the formula
Explanation of Solution
b)
Determining the values represented by 16 bits:
Formula to find the values of “n” bits:
Number of bits: 16
Values represented
Explanation of Solution
c)
Determining the values represented by 32 bits:
Formula to find the values of “n” bits:
Number of bits: 32
Values represented by 32 bits:
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Bit strings consist of 0 and 1. How many bit strings of length 7 either start with “1” or end with the 3 bits “000”?
A.80
B.72
C.64
D.16
Assume a 24-bit word on a computer. In these 24 bits, wewish to represent the value 295.1. a) How would the computer represent the decimal value295?2. b) If our computer uses 8-bit ASCII and even parity, howwould the computer represent the string 295?3. c) If our computer uses packed BCD with zero padding, howwould the computer represent the number +295?
Write a program that asks the user to enter and integer number and read it. Then ask him to enter a bit position (between 0 and 31) and display the value of that bit.
srlv $s1,$s2,$s3
s2 = 3210 = 0000 0000 0000 1000 0000 0000 010 00002
s3 = 18
Bit = 10
1 = 00000000000000000000000000010000
2 = 00000000000000000000000000001000
3 = 00000000000000000000000000000100
4 = 00000000000000000000000000000010
5 = 00000000000000000000000000000001
S1 = 00000000000000000000000000000001
1 = 00000000000000000000000000000001
$t0 = 00000000000000000000000000000001 =
x.1 = x
AND $t0,$s1,1
Chapter 1 Solutions
Java: Intro. to Prob. Solv... (Looseleaf)
Ch. 1.1 - What are the two kinds of memory in a computer?Ch. 1.1 - What is software?Ch. 1.1 - What data would you give to a program that...Ch. 1.1 - What data would you give to a program that...Ch. 1.1 - What is the difference between a program written...Ch. 1.1 - Is Java a high-level language or a low-level...Ch. 1.1 - Is Java bytecode a high-level language or a...Ch. 1.1 - What is a compiler?Ch. 1.1 - What is a source program?Ch. 1.1 - What do you call a program that translates Java...
Ch. 1.2 - What would the following statement, when used in a...Ch. 1.2 - Write a statement or statements that can be used...Ch. 1.2 - Prob. 13STQCh. 1.2 - What is the meaning of the following line in the...Ch. 1.2 - Write a complete Java program that uses system....Ch. 1.2 - Suppose you define a class named YourClass in a...Ch. 1.2 - Prob. 17STQCh. 1.3 - What is a method?Ch. 1.3 - Prob. 19STQCh. 1.3 - Do all objects of the same class have the same...Ch. 1.3 - Prob. 21STQCh. 1.3 - Prob. 22STQCh. 1.3 - Prob. 23STQCh. 1.3 - Prob. 24STQCh. 1.3 - What is an algorithm?Ch. 1.3 - What is pseudocode?Ch. 1.3 - Prob. 27STQCh. 1.3 - Prob. 28STQCh. 1.3 - Prob. 29STQCh. 1.3 - Prob. 30STQCh. 1.3 - Prob. 31STQCh. 1.3 - Suppose you write a program that is supposed to...Ch. 1.4 - Prob. 33STQCh. 1.4 - Prob. 34STQCh. 1 - How does a computers main memory differ from its...Ch. 1 - Prob. 2ECh. 1 - Prob. 3ECh. 1 - How does machine language differ from Java?Ch. 1 - What would the following statements, when used in...Ch. 1 - Write a statement or statements that can be used...Ch. 1 - Write statements that can be used in a Java...Ch. 1 - Given a persons year of birth, the Birthday Wizard...Ch. 1 - Write statements that can be used in a Java...Ch. 1 - Prob. 11ECh. 1 - Prob. 12ECh. 1 - Prob. 13ECh. 1 - Prob. 14ECh. 1 - What attributes and behaviors would an object...Ch. 1 - Suppose that you have a numberxthat is greater...Ch. 1 - Prob. 17ECh. 1 - Prob. 18ECh. 1 - Prob. 19ECh. 1 - Prob. 20ECh. 1 - Obtain a copy of the Java program shown in Listing...Ch. 1 - Modify the Java program described in Practice...Ch. 1 - Prob. 3PCh. 1 - The following program will compile but it has...Ch. 1 - Programming Projects require more problem-solving...Ch. 1 - Write a complete program for the problem described...Ch. 1 - Prob. 3PPCh. 1 - Prob. 4PPCh. 1 - Write an applet program for the problem described...Ch. 1 - Prob. 6PP
Knowledge Booster
Similar questions
- In general, how many things can be represented by n bits? Question 4 options: A. 2n B. 2n + 1 C. n2 D. n4 E. 2narrow_forward1. One byte equals to how many bits ? a. 4 bits b. 8 bits c. 12 bits d. 16 bitsarrow_forwardWrite a program that asks the user to enter and integer number and read it. Then ask him to enter a bit position (between 0 and 31) and display the value of that bit.(MIPS) srlv $s1,$s2,$s3 s2 = 3210 = 0000 0000 0000 1000 0000 0000 010 00002 s3 = 18 Bit = 10 1 = 00000000000000000000000000010000 2 = 00000000000000000000000000001000 3 = 00000000000000000000000000000100 4 = 00000000000000000000000000000010 5 = 00000000000000000000000000000001 S1 = 00000000000000000000000000000001 1 = 00000000000000000000000000000001 $t0 = 00000000000000000000000000000001 = x.1 = x AND $t0,$s1,1arrow_forward
- I am trying to get the range of bits from a number. For example , if I call bitRange(0x00001234, 0 , 4). I will get 0x00000004; 0x00001234 is the number i want to the range of bits from. 0 is the starting position. 4 is the number of bits to get from the number.arrow_forwardWhat bit pattern is stored for the following characters assuming an 8-bit byte? a. A b. a c. 8 d. % 2. What character is represented by the following bit patterns? a. 0011 0000 b. 0100 0011 c. 0111 1000 d. 0010 1010arrow_forwardPlease for thi question, kindly explain into details for me. This seems a new topic to me altogether. Thanks a lot. A bit string is a sequence of numbers consisting of 0’s and 1’s. Answer the following questions with explanation and/orclear computations.(a) How many bit strings of length 5 are there?(b) How many bit strings of length 5 contain at least three 0’s?(c) How many bit strings of length 6 are palindromic (i.e., read the same from left to right as from right to left)?(d) How many bit strings of length 8 contain at least two 1’s?arrow_forward
- Baud means? a. The number of bits transmitted per unit time b. The number of byted transmitted per unit time c. The rate at which the signal changes d. None of abovearrow_forwardThe characters bellow have the set of frequencies as follows: a : 15, c : 2, d : 3, o : 11, n : 13, r : 7, v: 4.A Huffman code is used to represent the characters. Decode the code “1111000110000110” byHuffman code.arrow_forwardNegative signed binary numbers What is the decimal representation of the 2-bit signed binary number 11? What is the decimal representation of the 16-bit signed binary number 1111_1111_1111_1111? How do the signed binary representations differ (ignoring the underscores)? What is the decimal representation of the 8-bit signed binary number 1001_0001? What is the decimal representation of the 16-bit signed binary number 1111_1111_1001_0001? How do the signed binary representations differ (ignoring the underscores)? What is the decimal representation of the 9-bit signed binary number 1_0001_0001? What is the decimal representation of the 16-bit signed binary number 1111_1111_0001_0001?arrow_forward
- 1. Suppose (27.625 base 10) is represented using IEEE754 Single Precision Floating Point Format. What is the Mantissa? 2. Suppose (27.625 base 10) is represented using IEEE754 Single Precision Floating Point Format. What is the exponent? Choices: 110111011101110110111010000000000000000110111010000000000000000100000110111011000000000000000000arrow_forwardNegative signed binary numbers What is the decimal representation of the 16-bit signed binary number 1111_1111_1001_0001? What is the decimal representation of the 9-bit signed binary number 1_0001_0001? What is the decimal representation of the 16-bit signed binary number 1111_1111_0001_0001?arrow_forwardSuppose we use a machine that represents integers in 9 bits. Our unsigned integers actlike what set of modulo numbers? (Hint: When counting up, where does a 9 bit numberreset to zero.)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education