hool Computer Science A UNIT 3 Data Structures and Algorithms LESSON 3 Simple Data Types Simple Data Types Quick Check What is a type of primitive data that is either negative or positive numerical whole numbers? (1 point) O integer O float O operator O character
Added by Robin C.
Close
Step 1
Step 1: A type of primitive data that is either negative or positive numerical whole numbers is called an integer. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 52 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Graded Learning Activity 4.1 Learning Objectives Organize data using structures. Use structures to group related but dissimilar data types. Write structured programming instructions so that the computer shows input/output behaviors. Instructions: Fraction Sum Create a struct to hold a fraction. The struct should have an integer numerator and an integer denominator member. Declare 2 fraction variables and read them in from the user. Write a function called multiply that takes both fractions, multiplies them together, and prints the result out as a fraction (numerator/denominator). You do not need to reduce the fraction to its lowest terms. // Enter the first fractional numbers in the format given below: // numerator(space)(symbol)(space)denominator (e.g. 2 / 5) Sample input/output: Enter first fractional number: 2 / 5 Enter second fractional number: 1 / 6 Resultant fractional number: 2 / 30 #include <iostream> using namespace std; int main() { // ToDo return 0; }
Akash M.
According to the IEEE 754 protocols, compute the following values: i) The greatest, positive, normal, floating-point number has a binary representation of Sign Exponent Mantissa 0 1 1 1 0 1 1 1 1 1 1 1 Derive its decimal value? ii) The smallest, positive, normal, floating-point number has a binary representation of Sign Exponent Mantissa 0 0 0 0 1 0 0 0 0 0 0 0 Derive its decimal value? iii) The greatest, positive, subnormal, floating-point number has a binary representation of Sign Exponent Mantissa 0 0 0 0 0 1 1 1 1 1 1 1 Derive its decimal value? iv) The smallest, positive, subnormal, floating-point number that is greater than 0 has a binary representation of (recall that 0_10 = 0 0000 0000000_2) Sign Exponent Mantissa 0 0 0 0 0 0 0 0 0 0 0 1
Adi S.
II. Data Representation and Operations (try not to use a calculator) -- 30 Points 1. Number Conversion Binary: 00001111 Hexadecimal: 0x000F Decimal: 15 Binary: 00001100 Hexadecimal: 0x1AD Decimal: 99 Decimal: 288 Binary: 00101011 2. Boolean Expression/Operation Note: the 1st row is an example A B A Binary: 0011 B AB Binary: 0011 A+B Binary: 0011 AB Decimal: 3 A+B Decimal: 3 Decimal: 3 0 15 4 Decimal: 3 15 15 8 Binary: 0011
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD