MIPS将十六进制转换为二进制(存储数组中的字节)

时间:2019-11-11 09:17:15

标签: mips mips32 qtspim mips64

我构建了一个程序,该程序将十六进制(用户输入)也转换为二进制(32位)。现在我可以打印它了,但是我不知道如何将这些字节存储到数组中以执行下一个任务。到目前为止,这是我的代码,假设$ t3是字节(0或1):

class RecyclerActivity : AppCompatActivity(){
   var rv:RecyclerView? = null
    var currentuser = FirebaseAuth.getInstance().currentUser!!.uid
    val str= FirebaseStorage.getInstance().reference
    var db = FirebaseFirestore.getInstance();

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_recycler)
        rec()

    }

@SuppressLint("WrongConstant")
fun rec(){
    var myarray=ArrayList<User>()
    rv=findViewById(R.id.idrecycler) as? RecyclerView
    db.collection("ProfileData")
        .addSnapshotListener { querySnapshot, firebaseFirestoreException ->
            if (querySnapshot != null) {
                for(da in querySnapshot) {
                    val note = da.toObject(Note::class.java)
                    var title = note.title
                    var description = note.notes
                    var username = note!!.username
                    var id = note!!.id
                    myarray.add(User(id!!,username!!, str.child(currentuser), title!!, description!!,false))
                }
            }
        }
    rv!!.layoutManager= LinearLayoutManager(this, LinearLayout.VERTICAL,false)
    val c= CustomAdapter(myarray )
    rv!!.adapter=c

}

0 个答案:

没有答案