Please ask 1 question at a time, although i have done the first
2.
Question 1:
(11001101) to decimal:
Question 2
350 to binary
Division by 2 | Quotient | Remainder |
350/2 | 175 | 0 |
175/2 | 87 | 1 |
87/2 | 43 | 1 |
43/2 | 21 | 1 |
21/2 | 10 | 1 |
10/2 | 5 | 0 |
5/2 | 2 | 1 |
2/2 | 1 | 0 |
Moving from bottom to top :
Exercises (No programming is required. Your submission should be a word or pdf document.) Question 1:...
CS 3503-06 Homework 1 Due: 11:59pm, Friday, Jan. 24. Please show the details of your work. Please submit in D2L using the associated link. Problems (total: 100 points) Representation of signed numbers (5 x 4 = 20 points) In an 8-bit system, find out the binary representation for the following numbers using sign-and-magnitude, ones’ complement, and two’s complement, respectively: 55 -47 In a 4-bit system, find out the binary representation for the following numbers using sign-and-magnitude, ones’ complement, and two’s...
Write a Java program to convert octal (integer) numbers into their decimal number equivalents (exactly the opposite of what you have done in Assignment 4). Make sure that you create a new Project and Java class file for this assignment. Your file should be named “Main.java”. You can read about octal-to-decimal number conversions on wikepedia Assignment 4 is at the bottom Objective Your program should prompt the user to enter a number of no greater than 8 digits. If the...
1. BINARYTODECIMAL,OCTAL(QUICK),ANDHEXADECIMAL(QUICK) The binary value you will be converting from will be derived from your Student ID (SID). Take each decimal digit of your SID and assign a “1” above it in the corresponding column on the “Binary Value” row below. If a “1” is already present from a past duplicate digit, keep it as a “1”. Place 0’s in any of the remaining empty columns of the “Binary Value”. You should now have a 10 digit unique binary value...
b) Convert the following numbers. (Please show all steps; no marks will be awarded if no steps are shown) i) 0xAD9 into 3-base representation ii) 4518 into 2-base (binary) representation iii) 123.35 into octal representation (up to 3 octal points) iv) 14.358 into decimal representation
write codes and give detailed explanation of how to execute. What you need to turn in: You will need to include an electronic copy of your report (standalone) and source code (zipped) of your programs. All programming files (source code) must be put in a zipped folder named "labl-name," where "name" is your last name. Submit the zipped folder on the assignment page in Canvas; submit the report separately (not inside the zipped folder) as a Microsoft Word or PDF...
write programs with detailed instructions on how to execute. code is java What you need to turn in: You will need to include an electronic copy of your report (standalone) and source code (zipped) of your programs. All programming files (source code) must be put in a zipped folder named "labl-name," where "name" is your last name. Submit the zipped folder on the assignment page in Canvas; submit the report separately (not inside the zipped folder) as a Microsoft Word...
Please answer the above queston (in terms of C programming) and explain answer Semester 2 & Trimester 3B, 2015 COMP1004 Engineering Programming Question 3 - Repetition (20 marks) Q3(a) What will be printed when the following code is executed? (5 marks] #include <stdio.h> int main() int i, j; for(i=1;i<17;i=i+2) { printf("%d==", i); for(j=i; j>0;j--) printf("#"); printf("\n"); return 0; == # 3 = = # # # 5 == ### ## 7 #### #
Question One (2 marks): What is the complexity of the given code as a function of the problem size n? Show the (complete) details of your analysis. Note: a [ i] s an array with n elements. for (int i- 0; i < n; i++) if (Math.random) > 0.5) if (i%2-0) Insertionsort (a[i]); else Quicksort (a[i]) else for (int j = 0; j < i; j++) for (int k 0: k 〈 i; k++) o (logn) Question One (2 marks):...
Need help in c++ programming to output the lines in my code: if word if found: cout << "'" << word << "' was found in the grid" << endl; cout << "'" << word << "' was not found in the grid" << endl; The words can be touching if they are horizontally, vertically, or diagonally adjacent. For example, the board: Q W E R T A S D F G Z X C V B Y U A...
What to submit: your answers to exercises 1, 3, and 4 and separate the codes to each question. Using your solution to question 3 of Lab Practice 2, modify it to create a class that contains a static method; the method takes a string as a parameter and returns a boolean value indicating whether the parameter string has repeated characters in it or not. That is, return true if there is at least one character which appears more than once...