Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CPTS 121 Final Exam questions n answers rated A+

Rating
-
Sold
-
Pages
12
Grade
A+
Uploaded on
24-09-2025
Written in
2025/2026

CPTS 121 Final Exam questions n answers rated A+

Institution
CPTS 121
Course
CPTS 121

Content preview

CPTS 121 Final Exam questions n
answers rated A+

recursion - correct answer ✔✔ The process in which a function calls itself either directly or
indirectly through another function



base case - correct answer ✔✔ tells when the recursion has to stop. For example, let us take
factorial function. The base case here is when n=0 or when n=1; and after every recursive call to
fact() function n value reduced by 1 and finally reaches base case.



recursive step - correct answer ✔✔ the line that calls the recursive function



recursive function - correct answer ✔✔ A function that calls itself



function call stack - correct answer ✔✔ (often referred to just as the call stack or the stack) is
responsible for maintaining the local variables and parameters during function execution.



what is a bit - correct answer ✔✔ Bit is derived from binary digit - A binary digit or bit has two
possible values; 0 or 1



nibble - correct answer ✔✔ A sequence of 4-bits

One example of a nibble of data is 11112 This is the number 15 in decimal



byte - correct answer ✔✔ A sequence of 8-bits

One example of a byte of data is 0100 00012 This is the number 65 in decimal It's also the ASCII
value for 'A'

, How can we determine if a number is even or odd without using the mod (%) operator? -
correct answer ✔✔ If the least significant bit (lsb) is 1 the number is odd, if its 0 the number is
even



How do we multiply and divide by powers of 2 without using the multiplication (*) and division
(/) operators? - correct answer ✔✔ Recall multiplication and division is expensive and resource
intensive

o Shift all bits in a number to the left by 1 to multiply by 2

o Shift all bits in a number to the right by 1 to divide by 2



bitwise negation - correct answer ✔✔ ~

0 -> 1 or 1 -> 0, where -> represents "becomes"



bitwise left shift - correct answer ✔✔ <<

means shift each bit in the number to the left by two positions and rotate in zeros - The result is
11002 if only a nibble of memory is available; otherwise it's 1011002



bitwise right shift - correct answer ✔✔ >>

means shift each bit in the number to the right by one position and rotate in zeros - The result is
01012; note the lsb is lost in the result



bitwise and - correct answer ✔✔ &

10102 & 00112; means AND each bit in each corresponding position - The result is 00102



bitwise or - correct answer ✔✔ |

10102 | 00112; means OR each bit in each corresponding position - The result is 10112



bitwise xor - correct answer ✔✔ ^

Written for

Institution
CPTS 121
Course
CPTS 121

Document information

Uploaded on
September 24, 2025
Number of pages
12
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$22.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
StuviaExamHub Havard School
Follow You need to be logged in order to follow users or courses
Sold
475
Member since
4 year
Number of followers
356
Documents
20077
Last sold
5 days ago
EXAM HUB (LATEST UPDATE)

QUALITY WORK OF ALL KIND OF QUIZ or EXAM WITH GUARANTEE OF AN A+ latest updates Im an expert on major courses especially; psychology,Nursing, Human resource Management &amp; Project writing. Assisting students with quality work is my first priority. I ensure scholarly standards in my documents . I assure a GOOD GRADE if you will use my work. Feel free to purchase n recommend others for 100% pass EXAMS!

3.7

90 reviews

5
43
4
10
3
17
2
7
1
13

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions