.MODEL SMALL
.STACK 100H
.DATA
MSG_1 EQU 'Enter the Hex digit (A-F) : $'
MSG_2 EQU 0DH,0AH,'The corresponding Decimal dgit is : $'
PROMPT_1 DB MSG_1
PROMPT_2 DB MSG_2
.CODE
MAIN
PROC MOV AX, @DATA
MOV DS, AX
LEA DX, PROMPT_1
MOV AH, 9
INT 21H
MOV AH, 1
INT 21H
MOV BL, AL
LEA DX, PROMPT_2
PROMPT_2
MOV AH, 9
INT 21H
MOV AH, 2
MOV DL, 31H
INT 21H
SUB BL, 11H
MOV DL, BL
INT 21H
MOV AH, 4CH
INT 21H
MAIN ENDP
END MAIN
Write a program that reads in two hexadecimal numbers from a file, hex.dat, and prints out...
(a) Hexadecimal numbers are numbers in base 16. They use the following sixteen digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. They are widely used in com- puting, for example, to represent colors or network addresses of computers. i. Convert A2F1316 to decimal. Show your work. ii. Convert 456710 into hexadecimal. Show your work. iii. Convert 00010101100011002 to hexadecimal. Explain how can you use the fact that 16 = 24 ?...
[Using Python] Write a program to convert a hexadecimal number to its decimal value. (Reminder: hexadecimal numbers are 0 through 9, A,B,C,D,E,F. hex(A) = 10, hex(F) = 15). example outputs: 1. `Enter a hex number: f` `The decimal value for hex number f is 15` 2. `Enter a hex number: g` `Incorrect hex number` 3. `Enter a hex number: 091c` `The decimal value for hex number 091c is 2332` 4. `Enter a hex number: 091g` `Incorrect hex number` Hints: you...
c++ Implement Radix Sort Most sorting algorithms, like bubble, insertion, selection and shell follow similar implementations. Radix sort is a unique sorting algorithm. In this assignment, implement the Radix Sort algorithm, as explained the text book in chapter 2. Use the Numbers.txt file in the DataFiles folder for the numbers to sort. Extra credit is available for processing alphabetic strings instead of just numbers. Specification: * Using your Doubly-Linked list to create an dynamic array of Doubly-Linked lists (like lab1)....
[Using Python] Write a program to convert a hexadecimal number to its decimal value using the ord builtin function (Reminder: hexadecimal numbers are 0 through 9, A,B,C,D,E,F. hex(A) = 10, hex(F) = 15). example outputs: 1. `Enter a hex number: f` `The decimal value for hex number f is 15` 2. `Enter a hex number: g` `Incorrect hex number` 3. `Enter a hex number: 091c` `The decimal value for hex number 091c is 2332` 4. `Enter a hex number: 091g`...
Write a program file_max.c that reads a set of integer numbers from a file and prints out the maximum number to standard output. The name of the input file should be specified as a command line argument.
Here is the Prompt for problem 1:
Write a C++ program that reads in a test file. The first number
in the file will be an integer, and will indicate the amount of
decimal numbers to follow. Once you have the read the numbers from
the file into an array then compute the following properties on the
set of numbers: the sum, the average (mean), the variance, the
standard deviation, and the median. Don’t try to do the entire
program...
Write a C program which will display the contents of a file in base-16 (hexadecimal) and in ASCII. Complete the following tasks: Obtain the name of the input file from the command line. If the command-line is “./hexdump xxx.bin” then argv[1] will contain “xxx.bin”. Open the file for binary input Print the entire file, 16-bytes per line. Each line should begin with an 8-digit hexadecimal offset into the file. This is the count of the bytes that you have already...
Write a program that reads the numbers from the file and totals the numbers. The program should print all the numbers and display the total when all the numbers have been added together. (Warning! The input from the file will be considered a string. Be sure to convert the input to int or float – just as you do when numbers are entered from the keyboard.) numbers.txt has this list of numbers 75 78 91 55 99 85 63 81...
Hi, I need help writing a program that reads in data (hex, octal or decimal values) from an input file and outputs the values in to another base form (hex, octal,decimal) one line at a time depending on the formatting characters provided by the input file. I am posting the code requirements below and an example of what theinput file will look like and what should be output by the program. I only need the one .cpp program file. Thanks...
Java. (20 pts) Write a program that reads all the numbers from the file mynums.dat and prints out the sum of the positive values from the file. Assume that the file contains only numeric values. You must output an error if the file can't be opened. You must write the complete program and the output when the program runs successfully must conform exactly to the sample output. Bonus ( 5 pts). Output an error if the file contains non-numeric...