Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo,

ich bin neu hier im Bereich und habe gleich das erste Problem.

Ich möchte gerne die Bitstellen 17 - 24 ändern bei einer 32 Bit Binärzahl aber wie mache ich das?

Die 32 Bit habe ich schon generiert. Aber wie kann ich nun die Bits 17-24 auf eine bestimmte Zahl ändern. Unabhängig von den anderen Bits.

       int eingabe=17;

        int e=eingabe;

                String s="";

        for(int i=30;i>=0;i--){

            if( (rot & (int) Math.pow(2, i))>0 ){

                s=(s+"1");

            }

            else

                s=(s+"0");

        }


        System.out.print(s);

Da wird : 00000000000000000000000000010001 ausgegeben, was auch Richtig ist.

Aber was ist wenn ich ab der 17.Stelle eine 55 haben möchte.

Also so: 00000000001101110000000000010001

Wie mach ich das?

Danke schonmal fürs Antworten^^

Achja eine erklärung dazu wäre perfekt.

Mfg:D

Klingt nach Hausaufgaben machen lassen. Gerade wenn du neu bist, bringt es dir nix, wenn jemand was für dich macht.

Mach doch mal selbst und wenn du konkrete Fragen hast, dann kannst Du sie hier doch einfach stellen. :)

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.