A company of soldiers are beyond enemy lines waiting to launch a surprise attack. However, they require orders from their commander, who will be sending a code (an integer) via a cell phone. It is known that the enemy can intercept all communications, which is why the commander and his troops have decided upon the details of the encoded secret code before setting off for the mission. The discussion is shown in the table below. For example, if bits 14, 11 and 7 of the secret code are 0, 0 and 0, it implies that the the company must hold their position. Assuming a random code between 39999 and 3999999 is received by the soldiers, determine what action will be taken. You are not allowed to convert the number into a binary in your code. Use bitwise operators.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 2.8CP
icon
Related questions
Question

in c language please and thank you also include a picture of the program and the output too thank you!!

A company of soldiers are beyond enemy lines waiting to launch a surprise attack. However,
they require orders from their commander, who will be sending a code (an integer) via a
cell phone. It is known that the enemy can intercept all communications, which is why the
commander and his troops have decided upon the details of the encoded secret code before
setting off for the mission. The discussion is shown in the table below. For example, if
bits 14, 11 and 7 of the secret code are 0, 0 and 0, it implies that the the company must
hold their position. Assuming a random code between 39999 and 3999999 is received by the
soldiers, determine what action will be taken. You are not allowed to convert the number
into a binary in your code. Use bitwise operators.
Bit 14
Bit 11
Bit 7
Action
Hold Position
1
Move and Take Cover
Abort Operation
Load Weapons
1
1
1
1
Attack at dusk
1
1
Attack now
1
1
Create a distraction
1
1
1
Wake up. This is a dream
Table 1: Discussion prior to deployment
Transcribed Image Text:A company of soldiers are beyond enemy lines waiting to launch a surprise attack. However, they require orders from their commander, who will be sending a code (an integer) via a cell phone. It is known that the enemy can intercept all communications, which is why the commander and his troops have decided upon the details of the encoded secret code before setting off for the mission. The discussion is shown in the table below. For example, if bits 14, 11 and 7 of the secret code are 0, 0 and 0, it implies that the the company must hold their position. Assuming a random code between 39999 and 3999999 is received by the soldiers, determine what action will be taken. You are not allowed to convert the number into a binary in your code. Use bitwise operators. Bit 14 Bit 11 Bit 7 Action Hold Position 1 Move and Take Cover Abort Operation Load Weapons 1 1 1 1 Attack at dusk 1 1 Attack now 1 1 Create a distraction 1 1 1 Wake up. This is a dream Table 1: Discussion prior to deployment
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage