Exercises for practising


Neptun ID:

Date/Time:

Full name:

To start the test, first enter the Neptun code and click the "Start Test" button. You have one hour to complete the test. After completing the test, save the website in pdf format (e.g. by printing to a file). The name of the file should be your Neptun ID entered above. When done,
send the pdf file of the test as an email attachment;
– attach the solution of exercise (15) in the form of a plain text file (e.g. NeptunID-JavaScript.txt) to the email to be sent;
– attach the one or two solutions of the last exercise (16) in the form of screenshots (e.g. NeptunID-screenshot-1.png, NeptunID-screenshot-2.png) to the email to be sent;
be sure to include your name, university major, and Neptun ID in the body of the email.
The address to which you should send the email:

    boda.istvan@drhe.hu
   

Scoring: Evaluation:

(1) Converting a hexadecimal number to a decimal number:

hexadecimal number: decimal number:

(2) Converting a binary number to a decimal number:

binary number: decimal number:

(3) Converting a decimal number to a binary number:

decimal number: binary number:

(4) Converting a binary number to a hexadecimal number:

binary number: hexadecimal number:

(5) Converting a decimal number to a hexadecimal number:

decimal number: hexadecimal number:


(6) Converting a binary fraction to a decimal fraction:

binary fraction: decimal fraction:

(7) Converting a decimal fraction to a binary fraction (only the first four fractional digits after the binary point):

decimal fraction: binary fraction:

(8) Transforming a decimal number into two's complement representation (in 8 bits):

decimal number: 8-bit binary complement code:

(9) Transforming an integer represented as an 8-bit binary complement into a decimal number:

8-bit binary complement code: decimal number:


(10) Converting a decimal number to a signed packed BCD format:

decimal number: packed BCD code:

(11) Converting an integer in signed unpacked BCD format to a decimal number:

unpacked BCD code: decimal number:

(12) Converting a real number in floating-point format to a decimal number:

floating-point number: 
decimal number: 

(13) determining the disjunctive normal form (DNF) of a logical function given by truth table:

truth table of the logical function
A B C p(A,B,C)
Adding special symbols:

– conjunction:
– disjunction:
– negation:

the DNF form of the logical function:


(14) determining the simplified form of the disjunctive normal form (DNF) of a logical function given above:
interactive Karnaugh-table
A B C
0 1
0 0 0 0
0 1 0 0
1 1 0 0
1 0 0 0
Adding special symbols:

– conjunction:
– disjunction:
– negation:

the simplified form of the logical function:

derivation of the simplified form of the logical function from the DNF form:


(15) prepare the truth table of both the DNF form of the logical function given above and its simplified form in JavaScript, and compare the values of the column 'DNF_form' with the values of the column 'simplified_form' in each row:
availability of the interactive JavaScript interpreter:
interactive JavaScript interpreter (mirrored)

The JavaScript program code (on the left panel of the JS interpreter) should be attached to the email to be sent in the form of a plain text file (e.g. NeptunID-JavaScript.txt).

display screen of the JavaScript program (right panel; the pattern in the textbox below should be deleted!):

are the values of the last two columns identical?


(16) implement the simplified form of the logic function with logic gates:
links to the logic gate simulators:
https://academo.org/demos/logic-gate-simulator/
https://simulator.io/

István Boda, 2023.