Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8766245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:30:11+00:00 2026-06-13T16:30:11+00:00

I have to make a program for school, a D-FlipFlop. To enter D and

  • 0

I have to make a program for school, a D-FlipFlop. To enter D and the e/clock I want to use 2 textboxes. (I also had to make a program with 3 ports that contain AND, NAND, OR, NOR, XOR ports, but that already works).

Input for D can be: 000001111100000111111100000011

Input for E can be: 000111000111000111000111000111

The value from textbox1 must go to a picturebox. So that with 0 and 1 you can draw a line and make the flipflop visual. The value from textbox2 needs to go to picturebox2.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:30:12+00:00Added an answer on June 13, 2026 at 4:30 pm

    This is possible. You’ll actually need to convert 000001111100000111111100000011 or 000111000111000111000111000111 which will be treated as string to a byte array byte[]. To do this, we’ll use Convert.ToByte(object value, IFormatProvider provider)

    string input = "BINARY GOES HERE";
    int numOfBytes = input.Length / 8; //Get binary length and divide it by 8
    byte[] bytes = new byte[numOfBytes]; //Limit the array
    for (int i = 0; i < numOfBytes; ++i)
    {
         bytes[i] = Convert.ToByte(input.Substring(8 * i, 8), 2); //Get every EIGHT numbers and convert to a specific byte index. This is how binary is converted :)
    }
    

    This will declare a new string input and then encode it to a byte array (byte[]). We’ll actually need this as a byte[] to be able to use it as a Stream and then insert it into our PictureBox. To do this, we’ll use MemoryStream

    MemoryStream FromBytes = new MemoryStream(bytes); //Create a new stream with a buffer (bytes)
    

    Finally, we can simply use this stream to create our Image file and set the file to our PictureBox

    pictureBox1.Image = Image.FromStream(FromBytes); //Set the image of pictureBox1 from our stream
    

    Example

    private Image Decode(string binary)
    {
        string input = binary;
        int numOfBytes = input.Length / 8;
        byte[] bytes = new byte[numOfBytes];
        for (int i = 0; i < numOfBytes; ++i)
        {
            bytes[i] = Convert.ToByte(input.Substring(8 * i, 8), 2);
        }
        MemoryStream FromBinary = new MemoryStream(bytes);
        return Image.FromStream(FromBinary);
    }
    

    By using this, you can whenever call, for example Decode(000001111100000111111100000011) and it will convert it to an image for you. Then, you may use this code to set the Image property of a PictureBox

    pictureBox1.Image = Decode("000001111100000111111100000011");
    

    IMPORTANT NOTICE: You may receive ArgumentException was unhandled: Parameter is not valid. this might happen due to an invalid Binary code.

    Thanks,

    I hope you find this helpful 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to make the program which have one form that contains PNG image
I have been trying, in vain, to make a program that reads text out
I have a Flash program that needs to make url requests to send data
We need to make some small program for school that rolls 5 dices and
I am currently trying to make a very simple C program for school that
So I have to make a flex program that matches numbers, floats, symbols, and
For a school assignment we have to make a client server chat program in
I have a class where I have to make a program that reads in
i want to make an program using web browser so i have make Account
I have to make a marks program that displays a set of marks that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.