0% found this document useful (0 votes)
15 views7 pages

DBA 2 Study Guide

Uploaded by

woodruem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views7 pages

DBA 2 Study Guide

Uploaded by

woodruem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Purpose and Function

All computing innovations have a purpose and function, and developers


scope these out before they write their first line of code. Purpose solves a
problem or creative pursuit, and function describes the steps to use the
innovation.
Purpose
Defining the purpose of a computing innovation is a crucial first step in its
development. This step helps designers and developers answer the question,
"We can build it, but should we build it?". If It doesn’t help people and
people don’t want to use it, then it won’t be successful. To define a
computing innovation's purpose, you first describe the problem it solves or
its creative pursuit.

Function
The function of a computing innovation is the steps it takes to work.
Developers define the function of computing innovations with as many
details as possible to help make sure they don't miss anything when they
begin creating it.

Pseudocode
Before developers create the functionality of an app or computing
innovation, they map out its logic using pseudocode. Pseudocode is an
algorithm's logic expressed by natural language, flowcharts, or
programming-like blocks or text.

Three Types of Pseudocode:


1. Natural Language

To assign a student's grade, check if a student's grade is greater than 60. If


the grade is greater than 60, print "passed," otherwise, print "failed."
2. Flow Chart
3. Programming Blocks

Data Compression
A file compression program can reduce a file's size by 40 to 80 percent.
Smaller files mean you can store more data. Computers, smart phones and
tablets use data compression to make files smaller. Data sent over the
internet also uses compression. cellular provider, internet provider, and the
social media app all use data compression to help the image upload as fast
as possible. Social media apps also apply additional compression to shrink
the image size so they can store the millions of photos uploaded daily.
Computing devices and programs use data compression to decrease the
number of bits in text, numbers, images, video, and audio data. Smaller data
files use less storage space and transmit faster. Data compression reduces
the amount of data that is stored or transmitted through two different kinds
of algorithms: lossless and lossy. Both algorithms work by removing bits
from the original data to make smaller files.
2 Types of Data Compression:

Lossless Data Compression Lossy Data Compression


Removes repeating bits of Removes repeating bits of
data when compressing a file. data when compressing a file.
Compression: Compression:
No information is permanently Permanently removes data
lost. from a file.
Decompression: Decompression:
It decompresses the file back Cannot restore data, but it
to the original data. is data you would not realize
is missing.
Best for:
Best for:
Lossless data compression is
best for data that needs to Lossy data compression is best
retain its original quality. when file size or transmission
speed is essential. Lossy data
Examples:
compression is best when a
 Banks and e-commerce smaller size for storage or
websites use lossless transmission is more
data compression to important than the quality of
maintain the accuracy the data.
of financial data.
Examples:
 Digital graphic designs
 Text
intended for print and
audio files meant for  Images
long-term storage and
future editing use  Files
lossless data  Lossy data compression
compression. Lossless is practical when data
compression ensures quality isn't as
that an artist can resize important.
the image to fit different
needs without the Lossy = Permanent
Binary Numbers
Binary data consists of 0’s and 1’s. Binary is the lowest level of processing in
a computer. The binary system is also called base 2 and is expressed in
powers of 2. Numbers defined in binary or decimal systems can be converted
to each other's system.
Let's work through converting the binary number 1100 to a decimal number
to illustrate.
1 Multiply Each Digit
Multiply each digit by its place value. Binary numbers only have two digits, 0
or 1, and are expressed in powers of 2. To calculate, multiply each digit in the
binary number by its place.

Binary Binary Place Decimal


Value Value Value

1 23 8

1 22 4

0 21 0

0 20 0

2 Add Decimal Values


Add all the decimal values together: 8+4+0+0=12

3 Result
1100 (base 2) = 12 (base 10)
Let's Try Another
Convert 11101001 to a decimal number.
1 Multiply Each Digit
Multiply each digit by its place value. Binary numbers only have two digits, 0
or 1, and are expressed in powers of 2. To calculate, multiply each digit in the
binary number by its place.

Binary Binary Place Decimal


Value Value Value

1 27 128

1 26 64

1 25 32

0 24 0

1 23 8

0 22 0

0 21 0

1 20 1

2 Add Decimal Values


Add all the decimal values together: 128+64+32+0+8+0+0+1= 233

3 Result
11101001 (base 2) = 233 (base 10)

Decimal to Binary
The method to convert decimal numbers to binary numbers uses
a recursive process of repeatedly dividing by 2 while keeping track of the
remainders. Once the quotient equals 0, write the remainders from last to
first.
Let's look at an example by converting the decimal number 25 to binary.
1 Divide by 2
Divide the given number by 2 and continue until the quotient equal 0.

Ste Divisi Quotie Remaind


p on nt er Notes

1 25/2 12 1 Quotient (12) is used in the next


step

2 12/2 6 0 Quotient (6) is used in the next


step

3 6/2 3 0 Quotient (3) is used in the next


step

4 3/2 1 1 Quotient (1) is used in the next


step

5 1/2 0 1 The quotient equals 0, so the


division stops.

2 Write the Value


Start with the last step and work backward to the first step, listing just the
remainders.

Ste Remaind Direction to Write


p er Binary Digit

1 1 End here (first step)

2 0

3 0
Ste Remaind Direction to Write
p er Binary Digit

4 1

5 1 Start here (last step)

So the decimal value 25 (base 10) becomes 11001 (base 2).


Remember, the last remainder will be the first digit in the binary number,
moving backward through the steps until the first remainder is the last digit
in the binary number.

You might also like