[CS457]HW2
.docx
keyboard_arrow_up
School
Northwestern Polytechnic University *
*We aren’t endorsed by this school
Course
457
Subject
Computer Science
Date
Jan 9, 2024
Type
docx
Pages
7
Uploaded by arsaikiran11
HOME WORK #2.
Answer:1
1.
List of all integers Data types :
Type
Storage
Minimum Value
Maximum Value
(Bytes)
(Signed/Unsigned)
(Signed/Unsigned)
TINYINT
1
-128
127
0
255
SMALLINT
2
-32768
32767
0
65535
MEDIUMINT
3
-8388608
8388607
0
16777215
INT
4
-2147483648
2147483647
0
4294967295
BIGINT
8
-9223372036854775808
9223372036854775807
0
18446744073709551615
Answer 2.
1.
select * from terms;
INSERT INTO terms(terms_description ,terms_due_days)VALUES ('Feb', 5);
2.
INSERT INTO vendors (vendor_name,vendor_address1,vendor_address2,vendor_city,vendor_state,vendor_zip_code,v
endor_phone,vendor_contact_last_name,vendor_contact_first_name)VALUES ('Arcot', '39800 Pathfinder', 'apt 421', 'fremont', 'ca', 94538,'4084311706', 'kiran', 'sai'), ('AAA', '39800 Pathfinder', 'apt 421', 'fremont', 'ca', 94538,'4084311706', 'kKK', 'SSS');
3.
INSERT INTO invoices(vendor_id,invoice_number,invoice_date ,invoice_total ,payment_total,credit_total,ter
ms_id ,invoice_due_date,payment_date)VALUES (2, 456, '2014-02-05', 100, 204, 421, 1, '2014-
03-13', '2014-03-06' ),(2, 123, '2014-03-05', 100, 204, 421, 1, '2014-04-13', '2014-04-06'),(2,123, '2014-04-05', 100, 204, 421, 1, '2014-05-13', '2014-05-06');
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
If a computer uses a 32-bit memory location to store a number, find the internal representation of the 131072
arrow_forward
Computer Architecture
Convert -0.000072 decimal number to their IEEE single precision floating-point counterparts.
arrow_forward
What is the largest unsigned integer that may be stored in 20 bits?
arrow_forward
Computer Architecture Question:
Assume a 32-bit floating-point number that is similar to the IEEE754 standard except for the number of bits that are devoted to the exponent is 10, to answer the following questions:
What is the maximum positive number?
What is the minimum positive number?
What is the decimal equivalent for (CD958000)16?
arrow_forward
How does a computer system store negative and real numbers in memory?
arrow_forward
Computer science based questions
arrow_forward
Using the signed-1's complement format, the representation of -7 is_
1000
0111
1111
1001
This is a standard binary code for the alphanumeric characters that uses seven
bits to code 128 characters
Hollerith Code
ASCII Code
EBCDIC Code
Gray Code
This is defined as a single variable within a term, in complemented or
uncomplemented form.
coefficient of variable
unary variable
literal
constant
arrow_forward
Computer Architecture: Sample Question Workout
Convert the following decimal numbers into normalized floating point binary numbers using a bias of 127.
-12.125 10
7.33 10
arrow_forward
Question 11
Not yet answered
P Flag question
A computer system uses 8 bits to represent floating-point values. The 8 bits are organised as follows:
The first bit is a sign bit (0 for positive, 1 for negative).
The middle 3 bits are the exponent, which uses bias of 3.
The last 4 bits are the significand, which is normalised in the same way as the significand is normalised in IEEE-754
formats.
The format does not reserve any special values.
The following arithmetic operation is performed on this system:
00011000 x 11000110
The result is then stored in the same 8-bit floating-point format.
What is the relative error of the stored result comapred to the value of the result of the arithmetic operation? Answer
s
are rounded to 5 decimal places.
O a. None of the other answers.
O b. 0.03030%
O c. 0.03125%
O d. 0.97865%
O e. 0%
arrow_forward
computer Architecture question
arrow_forward
The below numbers are written in 32-bit IEEE floating point format. What numbers are those?(a) 11000001111000000000000000000000(b) 00111111010100000000000000000000(c) 01000000000000000000000000000000
arrow_forward
H - For the IEEE 754 single-precision floating point, write the hexadecimal representation for the following decimal values:
(i)–1.0
(ii)– 0.0
(iii)256.015625
arrow_forward
Represent -0.65tenin single and double-precision formats:
Final representation: (-1)Sx (1 + Fraction) x 2(Exponent –Bias)
Single: (1 + 8 + 23)
Double: (1 + 11 + 52
)What decimal number is represented by the single-precision number?
1 1000 0001 11000...0000
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Related Questions
- If a computer uses a 32-bit memory location to store a number, find the internal representation of the 131072arrow_forwardComputer Architecture Convert -0.000072 decimal number to their IEEE single precision floating-point counterparts.arrow_forwardWhat is the largest unsigned integer that may be stored in 20 bits?arrow_forward
- Computer Architecture Question: Assume a 32-bit floating-point number that is similar to the IEEE754 standard except for the number of bits that are devoted to the exponent is 10, to answer the following questions: What is the maximum positive number? What is the minimum positive number? What is the decimal equivalent for (CD958000)16?arrow_forwardHow does a computer system store negative and real numbers in memory?arrow_forwardComputer science based questionsarrow_forward
- Using the signed-1's complement format, the representation of -7 is_ 1000 0111 1111 1001 This is a standard binary code for the alphanumeric characters that uses seven bits to code 128 characters Hollerith Code ASCII Code EBCDIC Code Gray Code This is defined as a single variable within a term, in complemented or uncomplemented form. coefficient of variable unary variable literal constantarrow_forwardComputer Architecture: Sample Question Workout Convert the following decimal numbers into normalized floating point binary numbers using a bias of 127. -12.125 10 7.33 10arrow_forwardQuestion 11 Not yet answered P Flag question A computer system uses 8 bits to represent floating-point values. The 8 bits are organised as follows: The first bit is a sign bit (0 for positive, 1 for negative). The middle 3 bits are the exponent, which uses bias of 3. The last 4 bits are the significand, which is normalised in the same way as the significand is normalised in IEEE-754 formats. The format does not reserve any special values. The following arithmetic operation is performed on this system: 00011000 x 11000110 The result is then stored in the same 8-bit floating-point format. What is the relative error of the stored result comapred to the value of the result of the arithmetic operation? Answer s are rounded to 5 decimal places. O a. None of the other answers. O b. 0.03030% O c. 0.03125% O d. 0.97865% O e. 0%arrow_forward
- computer Architecture questionarrow_forwardThe below numbers are written in 32-bit IEEE floating point format. What numbers are those?(a) 11000001111000000000000000000000(b) 00111111010100000000000000000000(c) 01000000000000000000000000000000arrow_forwardH - For the IEEE 754 single-precision floating point, write the hexadecimal representation for the following decimal values: (i)–1.0 (ii)– 0.0 (iii)256.015625arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning