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.

Benötige Hilfe mit C Programm

Empfohlene Antworten

Veröffentlicht

Hallo,

Ich soll ein C-Programm scheiben, was Dezimalzahlen in Binärzahlen umrechnet und habe leider absolut keine ahnung wie das gehen soll :(

Für einen Link auf ne seite wo sowas schonmal gemacht wurde, allgemeine tipps, irgend welche hilfen oder vielleicht sogar ein fertiges programm ( :D ) wäre ich sehr dankbar, da ich momentan total aufm schlauch steh

Danke schonmal im voraus

jo danke das sowas in der art hab ich gesucht !!

(aber natürlich bin ich auch für weitere tipps dankbar :D )

Einfach die Bits Deiner Variable (z.B. int) einzeln maskieren und falls gesetzt eine 1 Ausgeben, sonst eine 0. Maskieren kannst Du ein Bit, indem Du die Zahl mit der jeweiligen Zahl, bei der nur das gewünschte Bit gesetzt ist, binär UND-verknüpfst.

:mod:

Hallo,

Also, wie würdest Du eine Dezimalzahl in eine Binärzahl umwandeln (ohne Taschenrechner)

Beispiel Dezimal 19 :

19 : 2 = 9,5 ( 1 )

9 : 2 = 4,5 ( 1 )

4 : 2 = 2 ( 0 )

2 : 2 = 1 ( 0 )

1 : 2 = 0,5 ( 1 )

Hier ist dann die Lösung, 19 dezimal entspricht 10011 dual.

Gruß

s89MacUser

:beagolisc

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.