android--1212

Source: Internet
Author: User
Tags decimal to binary

1.

byte response;

(byte) Reader.read ()
Can accept 16 binary, two bit into 10 binary number

Converts a 10 binary number to a 16 binary number. You can do it.

The ReadLine will automatically convert the 16 decimal number into   a String here and convert it to 10 binary. Horizontal slot
Here, the return is accepted as a string type. can be read out. If you accept the 16 binary, you can't do it now.

               String str = integer.tohexstring (response);

Decimal to 16 binary: integer.tohexstring (int i) decimal into octal integer.tooctalstring (int i) decimal to binary integer.tobinarystring (int i) 10 Six decimal integer.valueof ("FFFF", +). ToString () octal to decimal integer.valueof ("876", 8). ToString () binary goto decimal integer.valueof ("0101", 2). ToString ()

1). int i = Integer.parseint ([String]);

or i = Integer.parseint ([string],[int radix]);

android--1212

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.