MP_02 Aufgaben

This commit is contained in:
Johannes Theiner 2018-03-20 21:00:20 +01:00
parent 8f7457e64d
commit 6b0d32e796
2 changed files with 15 additions and 3 deletions

Binary file not shown.

View File

@ -40,9 +40,13 @@ void printPascalString(PascalString s) {
}
}
int intToDual(int n) {
}
int main(int argc, char** argv, char** envp) {
PascalString s = {3, '1', '0', '0'};
PascalString s2 = {4, 'f', 'f', 'f', 'f'};
PascalString s = {3, '1', '0', '0'};
PascalString s2 = {4, 'f', 'f', 'f', 'f'};
println(hexStringToInt(s));
println(hexStringToInt(s2));
@ -52,6 +56,14 @@ int main(int argc, char** argv, char** envp) {
printPascalString(s2);
return 0;
int controlRegister = 128;
controlRegister |= 64+32;
controlRegister ^=16;
controlRegister &= 128+64;
controlRegister <<= 1;
println(controlRegister);
return 0;
}