Answer:
i. 10210212
ii. 100 101 001 in BASE 2
iii. 46.4631
iv. 12.453125
Explanation:
i. Converting to base 10 we get
= 10 x 162 + 13 x 161 + 9 x 160 = 2777
Converting to base 10 we get =
2777/3 = 925 with remainder 2
925/3 = 308 with remainder 1
308/3 = 102 with remainder 2
102/3 = 34 with remainder 0
34/3 = 11 with remainder 1
11/3 = 3 with remainder 2
3/3 = 1 with remainder 0
1/3 = 0 with remainder 1
Hence the Answer is 10210212
ii. = Octal is taken in pair of 3 bits , Writing binary of each number in 3 bits we get = 100 101 001 in BASE 2
iii. = 1 x 52 + 2 x 51 + 3 x 50 + 3 x 5-1 = 38.6 in decimal
Converting to Octal we get
38 /8 = 4 with remainder 6
4 /8 = 0 with remainder 4
.6 x 8 = 4.8
.8 x 8 = 6.4
46.4631
iv. = 1x 81 + 4 x 80 + 3 x 8-1 + 5 x 8-2 = 12.453125
Check here for Free courses about IT and Management www.eacademy.lk
Answer:
rv = "hello"
num_chars = len(rv)
print(num_chars)
Explanation:
*The code is in Python.
Initialize the string rv, in this example I set it to "hello"
Use the len() method to get the number of characters in the rv and set it to the num_chars
Print the num_chars
Note that the result will be 5 in this case, because <em>hello</em> consists of five characters
Answer:
Explanation:
Following are the Semaphores:
Customers: Counts waiting customers;
Barbers: Number of idle barbers (0 or 1)
mutex: Used for mutual exclusion.
Cutting: Ensures that the barber won’t cut another customer’s hair before the previous customer leaves
Shared data variable:
count_cust: Counts waiting customers. ------------copy of customers. As value of semaphores can’t access directly.
// shared data
semaphore customers = 0; semaphore barbers = 0; semaphore cutting = 0; semaphore mutex = 1;
int count_cust= 0;
void barber() {
while(true) { //shop is always open
wait(customers); //sleep when there are no waiting customers
wait(mutex); //mutex for accessing customers1
count_cust= count_cust-1; //customer left
signal(barbers);
signal(mutex);
cut_hair();
}
}
void customer() {
wait(mutex); //mutex for accessing count_cust
if (count_cust< n) {
count_cust= count_cust+1; //new customer
signal(customers); signal(mutex);
wait(barbers); //wait for available barbers get_haircut();
}
else { //do nothing (leave) when all chairs are used. signal(mutex);
}
}
cut_hair(){ waiting(cutting);
}
get_haircut(){
get hair cut for some time; signal(cutting);
}
Answer: 2 + 2 is 4 minus 1 thats 3 quick mafs
Explanation:
The element of website design that refers to the website's aesthetic appeal and the functional look and feel of the site's layout and visual design is known as context.
<h3>What is webpage context?</h3>
The web page context is known to be a kind of special ID that is is formed with all the new page load event.
The context of a website is known to be the point or place where a person can show their visitors that one care. It gives a kind of website's aesthetic appeal and the functional look.
Learn more about website design from
brainly.com/question/25941596