SlideShare a Scribd company logo
1 of 14
New Government
Form a New Government
Name
Class
Date
Professor
Form a Government
When an ocean liner with one thousand passengers becomes
stranded on a desert island it soon become apparent they will
not be rescued and must create some form of government. Since
the ocean liner contained citizens from different countries other
than America there are several ideas thrown about by the people
appointed to establish a government on the island. Even though
there are no Americans on the ship several passenger suggested
creating a democracy while other members of the group
suggested creating a socialist government. Other suggested in
this situation communism would be more effective.
The most effective government would be the democracy. The
democracy involves the chosen government being voted by the
people. The people in this case are the 1000 new members of
the island. Member of the population on the island can engage
in an election process in order to select by majority rule the
most popular candidates to acts as members of the government.
A democracy allows anyone in its population to become a
member of the government in order to ensure the government is
fair and non oppressive and the citizens receive human rights
protection.
A democratic government is split into three separate
branches. The three spate branches of government are designed
to ensure no one part of the government become more powerful
than another part of the government. The executive branch
includes the President while the legislative branch consists of
lawmakers, and the judicial branch is made up of the courts.
Each branch of government plays a specific role in the role
making process and has the power to veto the actions of the
other.
The executive branch (the President) can veto any laws
created by the legislation while Congress (the House and the
Senate) can veto the decision of the President. The judicial
branch reviews laws and determines their constitutionality. If
the judicial branch finds a law in unconstitutional it can strike it
from the law books. Through this process no branch can obtain
more power than another branch. This balance of power helps to
ensure that the will of a country's citizens is enforced rather
than the will of a small group of political leaders (Clark, 2001).
A democracy involves leader being held accountable if they
engage in bad acts and ensure citizens are afforded individual
rights. One of the most important principles of the democracy is
the right to pursue happiness in an environment free from
oppression. In a democracy people have a voice and the right to
personal freedoms. America was the first country to create a
democracy resulting in one of the most powerful countries in
the nation where the people are able to have a voice and live
free of oppression.
While a democracy has proven to be a successful form of
government there are two other forms of governments that have
been suggested by the group’s leaders. The socialist government
involves a socioeconomic system where the government own
education, government, and industry to ensure a prosperous
economy for the people. Socialist governments empower the
people to rule and collectively own aspects of the economy
(SLPA, 2006). This could be more effective for a smaller
population, such as a 1000 people. Some members of the group
have also suggested communism.
While communism sounds like a scary concept the goal is to
eliminate class conflict be ensuring every member of society
collectively own property (Blunden, 2005). The problem with
communism is there are no checks and balances to prevent the
government from becoming oppressive. The goal of socialism is
to end poverty while in a democracy the people have choices
and an opportunity to reach the American dream through their
votes and ability to voice their opinions freely.
The potential cons of choosing democratic government are it
is a slow process that will first have to begin with elections.
Democracy are built on the instead of free elections and
personal freedoms but the majority race, ethnicity, or culture
will quickly take power. For example if the passengers on the
boat are majority North Korean the end result could be that
North Koreans become the ruling class in the new society.
Democratic governments can result in elections where majority
voters get to decide how the new government is run so the
minority group voters have little or no say.
References
Blunden, A. (2005). The Principle of Communism. Retrieved
January 9, 2014 from
http://www.marxists.org/archive/marx/works/1847/11/prin-
com.htm
Clark, A. (2001). What Are the Benefits of Democracy in
Government? Retrieved January 9,
2014 from http://classroom.synonym.com/benefits-
democracy-government-6037.html
Socialist Labor Party of America. (2006). Socialism—its
meaning and promise. Retrieved
January 10, 2013 from
http://www.slp.org/res_state_htm/socialism_m_p.html
Lab 4
Lab Objectives
The objective for this lab is to become familiar with the stack
data structure. This will be achieved through the simulation of a
simple postfix notation (a.k.a., Reverse-Polish Notation or
RPN) calculator.
Description
A stack is a Last-In, First-Out (LIFO) data structure. A stack is
characterized by two fundamental operations: push and pull
(a.k.a., pop). The push operation adds a new item to the top of
the stack and the pull operation removes an item from the top of
the stack. The HCS12 contains several other instructions that
can be used to manipulate and access data stored in the stack. In
this lab, you will use the pull, push, and the other stack
instructions to carry out the following tasks.
The stack is probably the one concept in assembly programming
that is most critical to embedded programming, and is rarely
used when programming in higher level languages. The stack is
a section of memory that is allocated for temporary data
storage. A very rough metaphor, not to be taken too far, would
be to compare the stack to the RAM of your PC. The stack does
not hold data that can be manipulated; it’s simply a scratch pad
for holding things briefly. Most high level languages such as
Java and C++ utilize the stack to hold all of their temporary
data values instead of registers. This makes them more general
between architectures.
Postfix Notation
Postfix notation is a mathematical notation wherein every
operator follows all of its operands, in contrast to prefix
position. In postfix notation the operators follow their operands.
For instance, to add 3 and 4, one would write “3 4 +” rather
than “3 + 4”. If there are multiple operations, the operator is
given immediately after its second operand. So, the expression
written “3 − 4 + 5” in conventional infix notation would be
written “3 4 − 5 +” in postfix notation: first subtract 4 from 3,
then add 5 to that. An advantage of postfix notation is that it
obviates the need for parentheses that are required by infix.
While “3 − 4 x 5” can also be written “3 − (4 x 5)”, that means
something quite different from “(3 − 4) x 5”. In postfix, the
former would be written “3 4 5 x −”, which unambiguously
means “3 (4 5 x) −” which reduces to “3 20 −”; the latter would
be written “3 4 - 5 x”, which unambiguously means “(3 4 -) 5
x”.
Interpreters of postfix notation are often stack-based. That is,
operands are pushed onto a stack, and when an operation is
performed, its operands are popped from a stack and its result
pushed back on. So, the value of postfix expression is on the top
of the stack. Stacks, and therefore postfix notation, have the
advantage of being easy to implement and very fast.
Despite the name, postfix notation is not exactly the reverse of
Polish notation. For the operands of non-commutative
operations are still written in the conventional order. For
example, “/ 6 3” in prefix notation and “6 3 /” in postfix both
evaluating to 2, whereas “3 6 /” in postfix notation would
evaluate to ½.
Examples
Load the stack with 16-bit values from the index registers X and
Y and then store the top two 8-bit values in the stack into
accumulators A and B.
LDS #PROG ; Initialize the stack pointer to $2000
LDX #$0000
LDY #$FFFF
PSHX ; X (16-bit) stack
PSHY ; Y (16-bit) stack
After executing this code, if you were to look at the memory
addresses $1FFF to $1FFC and the registers it would look like:
$1FFB
--
X
$0000
Stack Pointer →
$1FFC
$FF
Y
$FFFF
$1FFD
$FF
A
--
$1FFE
$00
B
--
$1FFF
$00
$2000
--
Figure 1: Stack pointer and register contents after pushing index
registers onto stack.
The stack pointer is now pointing to address $1FFC. Continuing
the program:
PULA ; 8-bit of stack A
PULB ; 8-bit of stack B
The stack pointer now points to $1FFE:
$1FFB
--
X
$0000
$1FFC
--
Y
$FFFF
$1FFD
--
A
$FF
Stack Pointer →
$1FFE
$00
B
$FF
$1FFF
$00
$2000
--
Figure 2: Stack pointer and register contents after pulling two
8-bit values from stack into accumulators A and B.
The stack will grow without bound. If you keep pushing values
onto it, the stack pointer will continue to decrease, and you will
write over more and more memory. If you were using a specific
value of RAM to store a temporary data value not in the stack,
and the stack pointer then points to that address, you will lose
the old value. So be careful!
Work TaskStep 1
Allocate your stack such that the stack is located in what we
defined as the data section of RAM. Remember, we defined our
data section with the label “PROG” using the ORG assembler
directive. Use the LDS instruction to initialize your stack. Now,
load the stack using a loop with the values shown below. After
the stack is loaded, use the TSX command to transfer the SP to
index register X and then to load accumulator A with $44 and
accumulator B with $77 (HINT: take a look at the lecture on
stacks).
Memory
Stack Pointer →
$11
$22
$33
$44
$55
$66
$77
$88
Figure 3: Stack and its contents.Step 2
Code the simple postfix notation calculator that performs the
operation shown in Figure 4. This calculator will only perform
one operation (512+4*+3-). The infix expression of the
operation to be performed is “5 + ((1 + 2) x 4) – 3”. Don’t
worry about saving the operators on the stack. Always push
values on the stack. However, when you reach an operator, pull
the values off the stack into registers, perform the arithmetic
operation, and push the result back on the stack according to
Figure 4. Your final result should be 14 ($0E) and should be on
the top of the stack.
NOTE: the multiply instruction (MUL) multiplies two 8-bit
numbers and returns a 16-bit number. In this case, only return
the lower 8-bit as the result.
Input
Operation
Stack
Comment
5
Push Value
5
1
Push Value
1
5
2
Push Value
2
1
5
+
Add
3
5
Pull two value (1, 2) and push result (3)
4
Push Value
4
3
5
x
Multiply
12
5
Pull two value (3, 4) and push result (12)
+
Add
17
Pull two value (5, 12) and push result (17)
3
Push Value
3
17
-
Subtract
14
Pull two value (17, 3) and push result (14)
Result
(14)
Figure 4: Postfix notation operations.Step 3
Now take the postfix notation calculator a step further. Using a
loop, branches, and the stack, create a postfix notation
calculator that performs the operations specified in RPN_IN.
Add the variables below to the DATA section of your code. Use
these variables to implement your calculator. The variable
OPER contains the ASCII representation of the operators
(addition, subtraction, multiplication, and division) in HEX.
Use this variable in the loop to determine what operation to
perform. RPN_IN contains the variable with the operation to
perform. The values in RPN_IN below are initially 63/4*2+ and
the result should be 10. Try another operation of your choosing
by changing RPN_IN and discuss it in the methodology section
of your report.
RPN_IN FCB $06,$03,$2F,$04,$2A,$02,$2B ;
63/4*2+=10
RPN_OUT RMB 1
RPN_START FDB RPN_IN ; Pointer to start
of RPN array
RPN_END FDB RPN_OUT-1 ; Pointer to
end of RPN array
OPER FCB $2A,$2B,$2D,$2F ;*,+,-,/
HINTS: You will traverse the RPN_IN array in a similar fashion
to lab 3. You will jump out of the array when an operator is
found, pull two values off the stack, perform that particular
operation, push the result onto the stack, and then return to the
loop. Otherwise, you will just push the value on the stack.
NOTE: the divide instruction (IDIV) requires two 16-bit
registers and returns a 16-bit value. Only return the lower 8-bit
as your result.
What to Turn In (Please read this carefully)
You are to put your code as text and screenshots into the
“lab_4_template.docx” in the designated areas. This will be the
file that you upload to TITANium as your submission. Provide
your code as text, not an image. Points will be deducted if it is
an image. You are then to take screenshots of your program in
both CodeWarrior and terminal (i.e. on the Dragon board). The
screenshot should show the relevant CPU registers and memory
locations (NOTE: a convenient way of getting screenshots is to
use the “snipping tool”).
1/5
Program Code
Provide your program code here for each part of the work task.
It must be provided as text, not an image. You only need to
provide the code with the default post fix equation.
Screenshots
Code the infix notation equations below as postfix notation in
your program. Provide your screenshots that show the answers
for these equations. I want screenshots of the registers and the
memory location of the variables for both CodeWarrior and
terminal after execution.
1. ( ( 6 / 3 ) * 4 ) + 2
2. ( ( (2 * 3) * 5) / 2) + 1
3. ( (11 / 10) ) * 15
Questions
1. What are the advantages/disadvantages for allocating the
stack starting at PROG?
2. For step 1, does accessing the stack using index mode change
the SP? What are some advantages/disadvantages for accessing
the stack data this way?

More Related Content

Similar to New Government Form a New GovernmentNa.docx

Similar to New Government Form a New GovernmentNa.docx (11)

Good Thesis Statements Examples For Essays
Good Thesis Statements Examples For EssaysGood Thesis Statements Examples For Essays
Good Thesis Statements Examples For Essays
 
Exploratory Essay How To Write An Excellent Paper -
Exploratory Essay How To Write An Excellent Paper -Exploratory Essay How To Write An Excellent Paper -
Exploratory Essay How To Write An Excellent Paper -
 
090210 world free society 50m
090210 world free society 50m090210 world free society 50m
090210 world free society 50m
 
High School Student Scholarship Essay Contest
High School Student Scholarship Essay ContestHigh School Student Scholarship Essay Contest
High School Student Scholarship Essay Contest
 
Importance Of Healthy Living Essay. Long An
Importance Of Healthy Living Essay. Long AnImportance Of Healthy Living Essay. Long An
Importance Of Healthy Living Essay. Long An
 
Printable Lined Writing Paper - Printable Blan
Printable Lined Writing Paper - Printable BlanPrintable Lined Writing Paper - Printable Blan
Printable Lined Writing Paper - Printable Blan
 
7 Steps To Writing A Winning Scholarship Essay - Globa
7 Steps To Writing A Winning Scholarship Essay - Globa7 Steps To Writing A Winning Scholarship Essay - Globa
7 Steps To Writing A Winning Scholarship Essay - Globa
 
Example Of Reflection Paper On A Class - How To Write
Example Of Reflection Paper On A Class - How To WriteExample Of Reflection Paper On A Class - How To Write
Example Of Reflection Paper On A Class - How To Write
 
Write Essay Generation Gap
Write Essay Generation GapWrite Essay Generation Gap
Write Essay Generation Gap
 
3 Ways To Write A Concluding Paragraph For
3 Ways To Write A Concluding Paragraph For3 Ways To Write A Concluding Paragraph For
3 Ways To Write A Concluding Paragraph For
 
Legalization Of Cannabis Essay
Legalization Of Cannabis EssayLegalization Of Cannabis Essay
Legalization Of Cannabis Essay
 

More from henrymartin15260

NT2580 Week 1 Understanding IT Infrastructure Security An.docx
NT2580 Week 1 Understanding IT Infrastructure Security An.docxNT2580 Week 1 Understanding IT Infrastructure Security An.docx
NT2580 Week 1 Understanding IT Infrastructure Security An.docx
henrymartin15260
 
NTC362 Week 3OSI Model, Switching Systems, Network Channel Pr.docx
NTC362   Week 3OSI Model, Switching Systems, Network Channel Pr.docxNTC362   Week 3OSI Model, Switching Systems, Network Channel Pr.docx
NTC362 Week 3OSI Model, Switching Systems, Network Channel Pr.docx
henrymartin15260
 
NT2580 Week 4 Hardening a NetworkAnalysis 4.2Availability, In.docx
NT2580 Week 4 Hardening a NetworkAnalysis 4.2Availability, In.docxNT2580 Week 4 Hardening a NetworkAnalysis 4.2Availability, In.docx
NT2580 Week 4 Hardening a NetworkAnalysis 4.2Availability, In.docx
henrymartin15260
 
NTNU, May 2009 ntnu.nocbm 1 LEARNING AND MEMORY .docx
NTNU, May 2009 ntnu.nocbm 1 LEARNING AND MEMORY .docxNTNU, May 2009 ntnu.nocbm 1 LEARNING AND MEMORY .docx
NTNU, May 2009 ntnu.nocbm 1 LEARNING AND MEMORY .docx
henrymartin15260
 
nowHow to be Army StrongI was 18 years old when I saw my fa.docx
nowHow to be Army StrongI was 18 years old when I saw my fa.docxnowHow to be Army StrongI was 18 years old when I saw my fa.docx
nowHow to be Army StrongI was 18 years old when I saw my fa.docx
henrymartin15260
 
NR-351 Transitions in Professional NursingWebsite Evaluation T.docx
NR-351 Transitions in Professional NursingWebsite Evaluation T.docxNR-351 Transitions in Professional NursingWebsite Evaluation T.docx
NR-351 Transitions in Professional NursingWebsite Evaluation T.docx
henrymartin15260
 
Ntc 362 Week 2, Integrative Network Design Project , Part 1By Alucar.docx
Ntc 362 Week 2, Integrative Network Design Project , Part 1By Alucar.docxNtc 362 Week 2, Integrative Network Design Project , Part 1By Alucar.docx
Ntc 362 Week 2, Integrative Network Design Project , Part 1By Alucar.docx
henrymartin15260
 
NTHEMIND OF GREATCOMPANIESBy Scott BlanchardThe.docx
NTHEMIND OF GREATCOMPANIESBy Scott BlanchardThe.docxNTHEMIND OF GREATCOMPANIESBy Scott BlanchardThe.docx
NTHEMIND OF GREATCOMPANIESBy Scott BlanchardThe.docx
henrymartin15260
 
nR E E 693 5T o c o m p l e t e th i s e x a m y o u n.docx
nR E E 693 5T o c o m p l e t e th i s e x a m y o u n.docxnR E E 693 5T o c o m p l e t e th i s e x a m y o u n.docx
nR E E 693 5T o c o m p l e t e th i s e x a m y o u n.docx
henrymartin15260
 
NSG6001 Advanced Practice Nursing I Page 1 of 5 © 2007 S.docx
NSG6001 Advanced Practice Nursing I Page 1 of 5 © 2007 S.docxNSG6001 Advanced Practice Nursing I Page 1 of 5 © 2007 S.docx
NSG6001 Advanced Practice Nursing I Page 1 of 5 © 2007 S.docx
henrymartin15260
 
NR360 We Can But Dare We.docx Revised 5 ‐ 9 .docx
NR360   We   Can   But   Dare   We.docx   Revised   5 ‐ 9 .docxNR360   We   Can   But   Dare   We.docx   Revised   5 ‐ 9 .docx
NR360 We Can But Dare We.docx Revised 5 ‐ 9 .docx
henrymartin15260
 
ns;,eilrlt.lnterviewing is one HR function.docx
ns;,eilrlt.lnterviewing is one HR function.docxns;,eilrlt.lnterviewing is one HR function.docx
ns;,eilrlt.lnterviewing is one HR function.docx
henrymartin15260
 
NR443 Guidelines for Caring for PopulationsMilestone 2 As.docx
NR443 Guidelines for Caring for PopulationsMilestone 2 As.docxNR443 Guidelines for Caring for PopulationsMilestone 2 As.docx
NR443 Guidelines for Caring for PopulationsMilestone 2 As.docx
henrymartin15260
 
NRB Dec’99 1WHITHER THE EMERGENCY MANAGER 1Neil R Bri.docx
NRB Dec’99 1WHITHER THE EMERGENCY MANAGER 1Neil R Bri.docxNRB Dec’99 1WHITHER THE EMERGENCY MANAGER 1Neil R Bri.docx
NRB Dec’99 1WHITHER THE EMERGENCY MANAGER 1Neil R Bri.docx
henrymartin15260
 
Now, its time to create that treasure map to hide the treasur.docx
Now, its time to create that treasure map to hide the treasur.docxNow, its time to create that treasure map to hide the treasur.docx
Now, its time to create that treasure map to hide the treasur.docx
henrymartin15260
 
NR361 Information Systems in HealthcareInterview with a Nursing.docx
NR361 Information Systems in HealthcareInterview with a Nursing.docxNR361 Information Systems in HealthcareInterview with a Nursing.docx
NR361 Information Systems in HealthcareInterview with a Nursing.docx
henrymartin15260
 
NR360 Information Systems in Healthcare Team Technology Pr.docx
NR360 Information Systems in Healthcare Team Technology Pr.docxNR360 Information Systems in Healthcare Team Technology Pr.docx
NR360 Information Systems in Healthcare Team Technology Pr.docx
henrymartin15260
 
NR443 Guidelines for Caring for PopulationsMilestone 2 Assess.docx
NR443 Guidelines for Caring for PopulationsMilestone 2 Assess.docxNR443 Guidelines for Caring for PopulationsMilestone 2 Assess.docx
NR443 Guidelines for Caring for PopulationsMilestone 2 Assess.docx
henrymartin15260
 
Nowak Aesthetics, was founded by Dr. Eugene Nowak in 1999, in Ch.docx
Nowak Aesthetics, was founded by Dr. Eugene Nowak in 1999, in Ch.docxNowak Aesthetics, was founded by Dr. Eugene Nowak in 1999, in Ch.docx
Nowak Aesthetics, was founded by Dr. Eugene Nowak in 1999, in Ch.docx
henrymartin15260
 
NR305 Health Assessment Course Project Milestone #2 Nursing Di.docx
NR305 Health Assessment Course Project Milestone #2 Nursing Di.docxNR305 Health Assessment Course Project Milestone #2 Nursing Di.docx
NR305 Health Assessment Course Project Milestone #2 Nursing Di.docx
henrymartin15260
 

More from henrymartin15260 (20)

NT2580 Week 1 Understanding IT Infrastructure Security An.docx
NT2580 Week 1 Understanding IT Infrastructure Security An.docxNT2580 Week 1 Understanding IT Infrastructure Security An.docx
NT2580 Week 1 Understanding IT Infrastructure Security An.docx
 
NTC362 Week 3OSI Model, Switching Systems, Network Channel Pr.docx
NTC362   Week 3OSI Model, Switching Systems, Network Channel Pr.docxNTC362   Week 3OSI Model, Switching Systems, Network Channel Pr.docx
NTC362 Week 3OSI Model, Switching Systems, Network Channel Pr.docx
 
NT2580 Week 4 Hardening a NetworkAnalysis 4.2Availability, In.docx
NT2580 Week 4 Hardening a NetworkAnalysis 4.2Availability, In.docxNT2580 Week 4 Hardening a NetworkAnalysis 4.2Availability, In.docx
NT2580 Week 4 Hardening a NetworkAnalysis 4.2Availability, In.docx
 
NTNU, May 2009 ntnu.nocbm 1 LEARNING AND MEMORY .docx
NTNU, May 2009 ntnu.nocbm 1 LEARNING AND MEMORY .docxNTNU, May 2009 ntnu.nocbm 1 LEARNING AND MEMORY .docx
NTNU, May 2009 ntnu.nocbm 1 LEARNING AND MEMORY .docx
 
nowHow to be Army StrongI was 18 years old when I saw my fa.docx
nowHow to be Army StrongI was 18 years old when I saw my fa.docxnowHow to be Army StrongI was 18 years old when I saw my fa.docx
nowHow to be Army StrongI was 18 years old when I saw my fa.docx
 
NR-351 Transitions in Professional NursingWebsite Evaluation T.docx
NR-351 Transitions in Professional NursingWebsite Evaluation T.docxNR-351 Transitions in Professional NursingWebsite Evaluation T.docx
NR-351 Transitions in Professional NursingWebsite Evaluation T.docx
 
Ntc 362 Week 2, Integrative Network Design Project , Part 1By Alucar.docx
Ntc 362 Week 2, Integrative Network Design Project , Part 1By Alucar.docxNtc 362 Week 2, Integrative Network Design Project , Part 1By Alucar.docx
Ntc 362 Week 2, Integrative Network Design Project , Part 1By Alucar.docx
 
NTHEMIND OF GREATCOMPANIESBy Scott BlanchardThe.docx
NTHEMIND OF GREATCOMPANIESBy Scott BlanchardThe.docxNTHEMIND OF GREATCOMPANIESBy Scott BlanchardThe.docx
NTHEMIND OF GREATCOMPANIESBy Scott BlanchardThe.docx
 
nR E E 693 5T o c o m p l e t e th i s e x a m y o u n.docx
nR E E 693 5T o c o m p l e t e th i s e x a m y o u n.docxnR E E 693 5T o c o m p l e t e th i s e x a m y o u n.docx
nR E E 693 5T o c o m p l e t e th i s e x a m y o u n.docx
 
NSG6001 Advanced Practice Nursing I Page 1 of 5 © 2007 S.docx
NSG6001 Advanced Practice Nursing I Page 1 of 5 © 2007 S.docxNSG6001 Advanced Practice Nursing I Page 1 of 5 © 2007 S.docx
NSG6001 Advanced Practice Nursing I Page 1 of 5 © 2007 S.docx
 
NR360 We Can But Dare We.docx Revised 5 ‐ 9 .docx
NR360   We   Can   But   Dare   We.docx   Revised   5 ‐ 9 .docxNR360   We   Can   But   Dare   We.docx   Revised   5 ‐ 9 .docx
NR360 We Can But Dare We.docx Revised 5 ‐ 9 .docx
 
ns;,eilrlt.lnterviewing is one HR function.docx
ns;,eilrlt.lnterviewing is one HR function.docxns;,eilrlt.lnterviewing is one HR function.docx
ns;,eilrlt.lnterviewing is one HR function.docx
 
NR443 Guidelines for Caring for PopulationsMilestone 2 As.docx
NR443 Guidelines for Caring for PopulationsMilestone 2 As.docxNR443 Guidelines for Caring for PopulationsMilestone 2 As.docx
NR443 Guidelines for Caring for PopulationsMilestone 2 As.docx
 
NRB Dec’99 1WHITHER THE EMERGENCY MANAGER 1Neil R Bri.docx
NRB Dec’99 1WHITHER THE EMERGENCY MANAGER 1Neil R Bri.docxNRB Dec’99 1WHITHER THE EMERGENCY MANAGER 1Neil R Bri.docx
NRB Dec’99 1WHITHER THE EMERGENCY MANAGER 1Neil R Bri.docx
 
Now, its time to create that treasure map to hide the treasur.docx
Now, its time to create that treasure map to hide the treasur.docxNow, its time to create that treasure map to hide the treasur.docx
Now, its time to create that treasure map to hide the treasur.docx
 
NR361 Information Systems in HealthcareInterview with a Nursing.docx
NR361 Information Systems in HealthcareInterview with a Nursing.docxNR361 Information Systems in HealthcareInterview with a Nursing.docx
NR361 Information Systems in HealthcareInterview with a Nursing.docx
 
NR360 Information Systems in Healthcare Team Technology Pr.docx
NR360 Information Systems in Healthcare Team Technology Pr.docxNR360 Information Systems in Healthcare Team Technology Pr.docx
NR360 Information Systems in Healthcare Team Technology Pr.docx
 
NR443 Guidelines for Caring for PopulationsMilestone 2 Assess.docx
NR443 Guidelines for Caring for PopulationsMilestone 2 Assess.docxNR443 Guidelines for Caring for PopulationsMilestone 2 Assess.docx
NR443 Guidelines for Caring for PopulationsMilestone 2 Assess.docx
 
Nowak Aesthetics, was founded by Dr. Eugene Nowak in 1999, in Ch.docx
Nowak Aesthetics, was founded by Dr. Eugene Nowak in 1999, in Ch.docxNowak Aesthetics, was founded by Dr. Eugene Nowak in 1999, in Ch.docx
Nowak Aesthetics, was founded by Dr. Eugene Nowak in 1999, in Ch.docx
 
NR305 Health Assessment Course Project Milestone #2 Nursing Di.docx
NR305 Health Assessment Course Project Milestone #2 Nursing Di.docxNR305 Health Assessment Course Project Milestone #2 Nursing Di.docx
NR305 Health Assessment Course Project Milestone #2 Nursing Di.docx
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Recently uploaded (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

New Government Form a New GovernmentNa.docx

  • 1. New Government Form a New Government Name Class Date Professor Form a Government When an ocean liner with one thousand passengers becomes stranded on a desert island it soon become apparent they will not be rescued and must create some form of government. Since the ocean liner contained citizens from different countries other than America there are several ideas thrown about by the people appointed to establish a government on the island. Even though
  • 2. there are no Americans on the ship several passenger suggested creating a democracy while other members of the group suggested creating a socialist government. Other suggested in this situation communism would be more effective. The most effective government would be the democracy. The democracy involves the chosen government being voted by the people. The people in this case are the 1000 new members of the island. Member of the population on the island can engage in an election process in order to select by majority rule the most popular candidates to acts as members of the government. A democracy allows anyone in its population to become a member of the government in order to ensure the government is fair and non oppressive and the citizens receive human rights protection. A democratic government is split into three separate branches. The three spate branches of government are designed to ensure no one part of the government become more powerful than another part of the government. The executive branch includes the President while the legislative branch consists of lawmakers, and the judicial branch is made up of the courts. Each branch of government plays a specific role in the role making process and has the power to veto the actions of the other. The executive branch (the President) can veto any laws created by the legislation while Congress (the House and the Senate) can veto the decision of the President. The judicial branch reviews laws and determines their constitutionality. If the judicial branch finds a law in unconstitutional it can strike it from the law books. Through this process no branch can obtain more power than another branch. This balance of power helps to ensure that the will of a country's citizens is enforced rather than the will of a small group of political leaders (Clark, 2001). A democracy involves leader being held accountable if they engage in bad acts and ensure citizens are afforded individual rights. One of the most important principles of the democracy is the right to pursue happiness in an environment free from
  • 3. oppression. In a democracy people have a voice and the right to personal freedoms. America was the first country to create a democracy resulting in one of the most powerful countries in the nation where the people are able to have a voice and live free of oppression. While a democracy has proven to be a successful form of government there are two other forms of governments that have been suggested by the group’s leaders. The socialist government involves a socioeconomic system where the government own education, government, and industry to ensure a prosperous economy for the people. Socialist governments empower the people to rule and collectively own aspects of the economy (SLPA, 2006). This could be more effective for a smaller population, such as a 1000 people. Some members of the group have also suggested communism. While communism sounds like a scary concept the goal is to eliminate class conflict be ensuring every member of society collectively own property (Blunden, 2005). The problem with communism is there are no checks and balances to prevent the government from becoming oppressive. The goal of socialism is to end poverty while in a democracy the people have choices and an opportunity to reach the American dream through their votes and ability to voice their opinions freely. The potential cons of choosing democratic government are it is a slow process that will first have to begin with elections. Democracy are built on the instead of free elections and personal freedoms but the majority race, ethnicity, or culture will quickly take power. For example if the passengers on the boat are majority North Korean the end result could be that North Koreans become the ruling class in the new society. Democratic governments can result in elections where majority voters get to decide how the new government is run so the minority group voters have little or no say.
  • 4. References Blunden, A. (2005). The Principle of Communism. Retrieved January 9, 2014 from http://www.marxists.org/archive/marx/works/1847/11/prin- com.htm Clark, A. (2001). What Are the Benefits of Democracy in Government? Retrieved January 9, 2014 from http://classroom.synonym.com/benefits- democracy-government-6037.html Socialist Labor Party of America. (2006). Socialism—its meaning and promise. Retrieved January 10, 2013 from http://www.slp.org/res_state_htm/socialism_m_p.html Lab 4 Lab Objectives The objective for this lab is to become familiar with the stack data structure. This will be achieved through the simulation of a simple postfix notation (a.k.a., Reverse-Polish Notation or RPN) calculator. Description A stack is a Last-In, First-Out (LIFO) data structure. A stack is characterized by two fundamental operations: push and pull (a.k.a., pop). The push operation adds a new item to the top of the stack and the pull operation removes an item from the top of the stack. The HCS12 contains several other instructions that can be used to manipulate and access data stored in the stack. In this lab, you will use the pull, push, and the other stack
  • 5. instructions to carry out the following tasks. The stack is probably the one concept in assembly programming that is most critical to embedded programming, and is rarely used when programming in higher level languages. The stack is a section of memory that is allocated for temporary data storage. A very rough metaphor, not to be taken too far, would be to compare the stack to the RAM of your PC. The stack does not hold data that can be manipulated; it’s simply a scratch pad for holding things briefly. Most high level languages such as Java and C++ utilize the stack to hold all of their temporary data values instead of registers. This makes them more general between architectures. Postfix Notation Postfix notation is a mathematical notation wherein every operator follows all of its operands, in contrast to prefix position. In postfix notation the operators follow their operands. For instance, to add 3 and 4, one would write “3 4 +” rather than “3 + 4”. If there are multiple operations, the operator is given immediately after its second operand. So, the expression written “3 − 4 + 5” in conventional infix notation would be written “3 4 − 5 +” in postfix notation: first subtract 4 from 3, then add 5 to that. An advantage of postfix notation is that it obviates the need for parentheses that are required by infix. While “3 − 4 x 5” can also be written “3 − (4 x 5)”, that means something quite different from “(3 − 4) x 5”. In postfix, the former would be written “3 4 5 x −”, which unambiguously means “3 (4 5 x) −” which reduces to “3 20 −”; the latter would be written “3 4 - 5 x”, which unambiguously means “(3 4 -) 5 x”. Interpreters of postfix notation are often stack-based. That is, operands are pushed onto a stack, and when an operation is performed, its operands are popped from a stack and its result
  • 6. pushed back on. So, the value of postfix expression is on the top of the stack. Stacks, and therefore postfix notation, have the advantage of being easy to implement and very fast. Despite the name, postfix notation is not exactly the reverse of Polish notation. For the operands of non-commutative operations are still written in the conventional order. For example, “/ 6 3” in prefix notation and “6 3 /” in postfix both evaluating to 2, whereas “3 6 /” in postfix notation would evaluate to ½. Examples Load the stack with 16-bit values from the index registers X and Y and then store the top two 8-bit values in the stack into accumulators A and B. LDS #PROG ; Initialize the stack pointer to $2000 LDX #$0000 LDY #$FFFF PSHX ; X (16-bit) stack PSHY ; Y (16-bit) stack After executing this code, if you were to look at the memory addresses $1FFF to $1FFC and the registers it would look like: $1FFB -- X $0000 Stack Pointer → $1FFC $FF Y $FFFF
  • 7. $1FFD $FF A -- $1FFE $00 B -- $1FFF $00 $2000 -- Figure 1: Stack pointer and register contents after pushing index registers onto stack. The stack pointer is now pointing to address $1FFC. Continuing the program: PULA ; 8-bit of stack A PULB ; 8-bit of stack B The stack pointer now points to $1FFE:
  • 9. 8-bit values from stack into accumulators A and B. The stack will grow without bound. If you keep pushing values onto it, the stack pointer will continue to decrease, and you will write over more and more memory. If you were using a specific value of RAM to store a temporary data value not in the stack, and the stack pointer then points to that address, you will lose the old value. So be careful! Work TaskStep 1 Allocate your stack such that the stack is located in what we defined as the data section of RAM. Remember, we defined our data section with the label “PROG” using the ORG assembler directive. Use the LDS instruction to initialize your stack. Now, load the stack using a loop with the values shown below. After the stack is loaded, use the TSX command to transfer the SP to index register X and then to load accumulator A with $44 and accumulator B with $77 (HINT: take a look at the lecture on stacks). Memory Stack Pointer → $11 $22 $33 $44 $55
  • 10. $66 $77 $88 Figure 3: Stack and its contents.Step 2 Code the simple postfix notation calculator that performs the operation shown in Figure 4. This calculator will only perform one operation (512+4*+3-). The infix expression of the operation to be performed is “5 + ((1 + 2) x 4) – 3”. Don’t worry about saving the operators on the stack. Always push values on the stack. However, when you reach an operator, pull the values off the stack into registers, perform the arithmetic operation, and push the result back on the stack according to Figure 4. Your final result should be 14 ($0E) and should be on the top of the stack. NOTE: the multiply instruction (MUL) multiplies two 8-bit numbers and returns a 16-bit number. In this case, only return the lower 8-bit as the result. Input Operation Stack Comment 5 Push Value 5 1 Push Value 1 5
  • 11. 2 Push Value 2 1 5 + Add 3 5 Pull two value (1, 2) and push result (3) 4 Push Value 4 3 5 x Multiply 12 5 Pull two value (3, 4) and push result (12) + Add 17 Pull two value (5, 12) and push result (17) 3 Push Value 3 17 - Subtract 14 Pull two value (17, 3) and push result (14)
  • 12. Result (14) Figure 4: Postfix notation operations.Step 3 Now take the postfix notation calculator a step further. Using a loop, branches, and the stack, create a postfix notation calculator that performs the operations specified in RPN_IN. Add the variables below to the DATA section of your code. Use these variables to implement your calculator. The variable OPER contains the ASCII representation of the operators (addition, subtraction, multiplication, and division) in HEX. Use this variable in the loop to determine what operation to perform. RPN_IN contains the variable with the operation to perform. The values in RPN_IN below are initially 63/4*2+ and the result should be 10. Try another operation of your choosing by changing RPN_IN and discuss it in the methodology section of your report. RPN_IN FCB $06,$03,$2F,$04,$2A,$02,$2B ; 63/4*2+=10 RPN_OUT RMB 1 RPN_START FDB RPN_IN ; Pointer to start of RPN array RPN_END FDB RPN_OUT-1 ; Pointer to end of RPN array OPER FCB $2A,$2B,$2D,$2F ;*,+,-,/ HINTS: You will traverse the RPN_IN array in a similar fashion to lab 3. You will jump out of the array when an operator is found, pull two values off the stack, perform that particular operation, push the result onto the stack, and then return to the loop. Otherwise, you will just push the value on the stack.
  • 13. NOTE: the divide instruction (IDIV) requires two 16-bit registers and returns a 16-bit value. Only return the lower 8-bit as your result. What to Turn In (Please read this carefully) You are to put your code as text and screenshots into the “lab_4_template.docx” in the designated areas. This will be the file that you upload to TITANium as your submission. Provide your code as text, not an image. Points will be deducted if it is an image. You are then to take screenshots of your program in both CodeWarrior and terminal (i.e. on the Dragon board). The screenshot should show the relevant CPU registers and memory locations (NOTE: a convenient way of getting screenshots is to use the “snipping tool”). 1/5 Program Code Provide your program code here for each part of the work task. It must be provided as text, not an image. You only need to provide the code with the default post fix equation. Screenshots Code the infix notation equations below as postfix notation in your program. Provide your screenshots that show the answers for these equations. I want screenshots of the registers and the memory location of the variables for both CodeWarrior and terminal after execution. 1. ( ( 6 / 3 ) * 4 ) + 2
  • 14. 2. ( ( (2 * 3) * 5) / 2) + 1 3. ( (11 / 10) ) * 15 Questions 1. What are the advantages/disadvantages for allocating the stack starting at PROG? 2. For step 1, does accessing the stack using index mode change the SP? What are some advantages/disadvantages for accessing the stack data this way?