true or false 10). The c64 DSP is a VLIW machine in which the parallel execution
ID: 3569836 • Letter: T
Question
true or false
10). The c64 DSP is a VLIW machine in which the parallel execution, i.e. whether two instructions may be executed logically during the same CPU clock cycle, is specified in instruction bundles. 11). The c64 architecture has (4) different types of functional units {D, L, M and S} which can each execute a subset of the available instructions. 12). The ARM instruction set architecture is the intellectual property of ARM holdings, a fab-less corporation which licenses the ARM ISA to multiple silicon vendors. 13). An assembler requires 20-60 passes through the source code to transform source code into executable code. 14). The multiple operating modes enabled in the ARM architecture allows for the CPU to be simultaneously executing instructions for the interrupt at the same time as the user/foreground instructions. 15). The use of the Thumb instruction set is typically going to result in a smaller program size (in machine code bytes) than use of the ARM instruction set for the same source code. 16). An instruction set such as the 32-bit ARM ISA utilizes uniform explicit register operands in the machine language instructions. 17). AMD was the first company to produce an x86-64 architecture processor. 18). Typically, increasing the processor operating frequency will increase the power consumed by the processor. 19). Typically, running a digital integrated circuit at a higher operational temperature will increase the operational lifespan. 20). Typically, reducing the supply voltage of a digital integrated circuit while holding other parameters constant will reduce the power consumed by that microprocessor.Explanation / Answer
#include <iostream>
#include <cstdlib>
using namespace std;
typedef enum
{
VALUE,
JACK,
QUEEN,
KING,
ACE
} FACE;
typedef struct
{
int value;
FACE f;
} CARD;
void print_card(CARD c)
{
if (c.f == ACE)
cout << "ACE (11)";
else if (c.f == KING)
cout << "KING (10)";
else if (c.f == QUEEN)
cout << "QUEEN (10)";
else if (c.f == JACK)
cout << "JACK (10)";
else if (c.f == VALUE)
{
if (c.value == 10)
cout << "TEN (10)";
else if (c.value == 9)
cout << "NINE (9)";
else if (c.value == 8)
cout << "EIGHT (8)";
else if (c.value == 7)
cout << "SEVEN (7)";
else if (c.value == 6)
cout << "SIX (6)";
else if (c.value == 5)
cout << "FIVE (5)";
else if (c.value == 4)
cout << "FOUR (4)";
else if (c.value == 3)
cout << "THREE (3)";
else if (c.value == 2)
cout << "TWO (2)";
else
cout << "Value not recognized";
}
else
cout << "Face not recognized";
}
void init_deck(CARD deck[])
{
for (int index = 0; index < 4; index++)
{
int seg = index * 13;
deck[seg + 0].f = VALUE;
deck[seg + 0].value = 2;
deck[seg + 1].f = VALUE;
deck[seg + 1].value = 3;
deck[seg + 2].f = VALUE;
deck[seg + 2].value = 4;
deck[seg + 3].f = VALUE;
deck[seg + 3].value = 5;
deck[seg + 4].f = VALUE;
deck[seg + 4].value = 6;
deck[seg + 5].f = VALUE;
deck[seg + 5].value = 7;
deck[seg + 6].f = VALUE;
deck[seg + 6].value = 8;
deck[seg + 7].f = VALUE;
deck[seg + 7].value = 9;
deck[seg + 8].f = VALUE;
deck[seg + 8].value = 10;
deck[seg + 9].f = JACK;
deck[seg + 9].value = 10;
deck[seg + 10].f = QUEEN;
deck[seg + 10].value = 10;
deck[seg + 11].f = KING;
deck[seg + 11].value = 10;
deck[seg + 12].f = ACE;
deck[seg + 12].value = 11;
}
}
void print_deck(CARD deck[])
{
for (int x = 0; x < 52; x++)
{
print_card(deck[x]);
cout << endl;
}
}
void shuffle_deck(CARD deck[])
{
for (int x = 0; x < 52; x++)
{
int new_index = rand() % 52;
CARD temp = deck[x];
deck[x] = deck[new_index];
deck[new_index] = temp;
}
}
int main()
{
srand();
CARD deck[52];
init_deck(deck);
shuffle_deck(deck);
print_deck(deck);
int bank;
int seed;
int bet;
cout << "Enter the initial bankroll" << endl;
cin >> bank;
cout << "Enter seed" << endl;
cin >> seed;
cout << "Seeding random number generator..." << endl;
cout << "== Blackjack v1.0 ==" << endl;
cout << "Initializing deck..." << endl;
init_deck(deck);
cout << "Shuffling deck..." << endl;
shuffle_deck(deck);
cout << "Enter bet:" << endl;
cin >> bet;
cout << "Current hand: " << srand(seed) % 3 << ".";
cout << "Player has: " << endl;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.