eregister prüfung abschluss parameters

This commit is contained in:
Stoyan Zlatev
2024-10-14 08:43:56 +02:00
parent 55b25af756
commit 4c230b97cf
46 changed files with 870 additions and 247 deletions
+28
View File
@@ -1,10 +1,38 @@
namespace CommonConsole
{
using System;
public class Program
{
public static void Main()
{
var bytes = new Byte[] { 0x00, 0x00, 0x00, 0x05 };
var index = 0;
var valueMSB = 0;
valueMSB ^= bytes[index++] << 24;
valueMSB ^= bytes[index++] << 16;
valueMSB ^= bytes[index++] << 08;
valueMSB ^= bytes[index++] << 00;
index = 3;
var valueLSB = 0;
valueLSB ^= bytes[index--] << 24;
valueLSB ^= bytes[index--] << 16;
valueLSB ^= bytes[index--] << 08;
valueLSB ^= bytes[index--] << 00;
Console.WriteLine($"{nameof(valueMSB)} == {nameof(valueLSB)} => {valueMSB} == {valueLSB} = {valueMSB == valueLSB}");
var _lsb = BitConverter.ToInt32(bytes, 0);
Array.Reverse(bytes);
var _msb = BitConverter.ToInt32(bytes, 0);
Console.WriteLine($"{nameof(_msb)} == {nameof(_lsb)} => {_msb} == {_lsb} = {_msb == _lsb}");
}
}
}